matthiasm wrote:
> 
> On Jul 8, 2007, at 3:14 PM, Hans George wrote:
> 
>> Hello FLTK-experts!
>>
>> I?ve got a "simple" question: Is there a way to brighten a specific 
>> area of a images with fltk2?
>>
>> For example:
>> I`ve got a window with a background image. When the mouse enters a 
>> specific area of this image, than this area should be brighten.
>>
>> I couldn`t find a helpfull methode in the draw.h ...
> 
> Fl_RGB_Image (or the correspoding FLTK2 interfaces) has a method 
> "darken". You could copy that and write a "lighten" function. Then write 
> a custom "draw()" function. When you need to highlight the rectangle, 
> draw the whole original image first, then us fl_draw_image again to draw 
> the subarea of the brighter image over the old image.
> 
> To draw a subrectangle, you have to juggle with pointers and coordinates 
> a little.
 > ...

Or you could just draw the lighter image, clip inside this rect,
and then draw the normal image.  No juggling and more than likely
faster... :)

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to