Brushes

How do I get a fuzzy effect for the brush?
ShivaliAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

BudVVeezerCommented:
What do you mean by fuzzy effect?  Is this a programming quesion?

~Aaron
0
GlennDeanCommented:
 Shivali:
  I think what they mean is to NOT create a solid brush, for example do NOT write
HBRUSH hBrush =
CreateSolidBrush(RGB(17,155,100));
   Instead, you need to create a hatched brush or a brush from a bitmap (most likely what you need to do).  To create bitmap brush, you must first get a HBITMAP handle to the bitmap.  To do this, in your project each bitmap defined should have a resource ID (for example anything on your toolbar is a bitmap and definitely has a resource ID).  You can also create handles from any *.bmp bitmap file.  Assuming you have a resource id, just write
HBITMAP hbitmap =
LoadBitMap(hInstance,ID_OF_BITMAP);
  Of course, you want to make sure your bitmap has a "fuzzy shape" to it.  Finally, to create the brush just write
HBRUSH hBrush =
 CreatePatternBrush(hbitmap);

   Hope this answers your question.
         Glenn
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
BudVVeezerCommented:
of course, if you waited to see what Shivali was ASKING, then you might know for sure....then maybe you could give the answer that they need, instead of guessing.

~Aaron
0
The Ultimate Tool Kit for Technolgy Solution Provi

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy for valuable how-to assets including sample agreements, checklists, flowcharts, and more!

ShivaliAuthor Commented:
Actually I wanted a mask for the brush.
What I mean by mask is that when I click, the color should show maximum at the center and it should show faded effect as the distance from the center increases. This should depend on the Opacity. To make it even more explainable, the effect of the brush should be something like that in Paint Shop Pro application. Please help me in getting this effect. It would be even nice if u could supply the code.
Thanx  
0
BudVVeezerCommented:
Then why did you accept his answer right now if it is not what you need?  It's better to wait until the question is answered before you award points...

~Aaron
0
ShivaliAuthor Commented:
Hi Aaron,
    I would like to ask u the same question...Please help me if u can....
Since I am a newbie to this site....I was not aware of the point system...Thanx for ur advice...I will take care of it in future...
I hope I hav made my question quite understandable....
Thanxalot
0
BudVVeezerCommented:
Well, I'll have to do some reading up on masks, as it's been a while since I've had to deal with them, I'll get back to you when I can.  And no prob, we all have to start sometime!  Sorry for coming accross as crabby though.  Been a long week.  ;-)

~Aaron
0
GlennDeanCommented:
Aaron & Shivali:
  Boy, did I sure guess at your question.  I think it's best to put more details in your question than less.  From your original 1-line question, I just took a crack at it, hoping the remote possibility existed that you didn't know the basics of brushes.  It's clear from your comments above that you know way more than me on brushes.  Anyway, I hope Aaron can solve your problem, cause I sure know I can't!
          Glenn  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Hardware

From novice to tech pro — start learning today.