• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

Brushes

How do I get a fuzzy effect for the brush?
0
Shivali
Asked:
Shivali
  • 4
  • 2
  • 2
1 Solution
 
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
 
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
SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

 
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

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

  • 4
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now