Link to home
Start Free TrialLog in
Avatar of Anisha
Anisha

asked on

Brush Mask

I want a Brush Mask such that the color is maximum at the center and the color fades out as the distance from the center increases. This fading is also
dependend on the opacity and the hardness of the brush like that in PaintShop Pro. I would be grateful if u could help me out with this.
Avatar of akalmani
akalmani

Quiet intersting !!
Avatar of Anisha

ASKER

hi,
Where is the solution to the problem???????
Standard C++ provides no facilities for graphics.  This sort of thing has to be done through Operating System specifc techniques.  So we would have to know what operating system.

FYI neither windows not Macintosh (At leat Mac of 10 years ago) provides features for doign this directly.  On these OSs you woudl have to do the drawing work "maunually" by specifying the colors of each pixel effected.
Avatar of Anisha

ASKER

Hi;
Sorry for not being specific in my question. I shall try and explain, i am working on Image processing in VC++ 6.0 and i am trying to create brush which has the same effect as that in PaintShop Pro , but somehow the effect is not working out. The opacity and hardness is not getting applied properly, also the speed of the brush is slow.Can somebody help me in this.

Thank u
Anisha.
How are you doing this?  The windows API does not have brushes that have "opacity and hardness" so you have to be doing all this manually, right?
HI Anisha !!
  Just an extension to what nietod has said, u have to do it manually there is no API or any MFC class function to do it. U have to do it pixel by pixel for any particular area where u want to draw. The opacity and hardness can be given as u said. I was not sure about his so i searched in msdn. May be this information will help u.
Thanks, that is clearer, except you say "opacity and hardness can be given"  Do you mean the windows API does support these?  
Avatar of Anisha

ASKER

Hi Akalmani and Nietod,
   Yes , Akalmani is right , i am processing it pixel by pixel, and applying formulas to obtain opacity and hardness , no windows API does not support  this i have used some image processing formulas.

Anisha

It sounds like you are already doing this though, are you?  What exactly do you need help with?  The algorithm for setting the pixels? The  interface for allowing the user to draw?  I'm not sure what you have and I'm not sure what you are looking for.
Avatar of Anisha

ASKER

Hi nietod;
   Sorry about not being clear to u . I am new to this site and probably i have selected the wrong category, but still i shall repeat myself.
Look, i am developing an application in VC++ 6.0 related to image processing. Yes i have almost done it . If u can refer to PaintShop Pro and see the brush effect given there , it is solid in the middle but keeps fading outwards depending on hardness and opacity.
i want the algo for such a brush effect.
ASKER CERTIFIED SOLUTION
Avatar of nietod
nietod

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial