> > Fl_RGB_Image (or the correspoding FLTK2 interfaces) has a method > >"darken".
> Hm, isn`t this methode listed up in the documentation, or am I to blind to > find it? It should be listed up here: > http://www.fltk.org/doc-1.1/Fl_RGB_Image.html shouldn`t it? > > I can`t find this methode in the fltk2 source code, too ... Actually there is not similar method. But, you can cook your own very easilly. After you draw the image, determine "brightness" region (you decide about width and height), and loop throught the same position (x,y,w,h) _on_ the image and pull out RGB values. Be carefull; first you have to check pixel types since image can be encoded in one of RGB,RGBA,RGBM,etc. formats (check PixelType.h). Then adjust brightness values to each of components, like: r += brightness; if(r > 255) r = 255; g += brightness; if(g > 255) g = 255; b += brightness; if(b > 255) b = 255; and encode those components back to the same format. As Mike said, then just clip it on original image. > Or you could just draw the lighter image, clip inside this rect, > and then draw the normal image. Maybe would be better to draw normal image first, and then to clip lighter on it :) PS: I would propose (for simplicity of the code) to have your own "brightness" buffer (it's size would be w * h * image_depth, where w and h are sizes of the region) and after filling it with changed values, clip/draw it on the original. -- Sanel _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

