On 4 Jan 2012, at 13:50, N. Cassetta wrote:

>> I'm still using ver 1.1.10 but, reading 1.3.0 docs, seems that nothing is 
>> changed about colors.
>> For example, when drawing a selection box in a Fl_Overlay_Window, it would 
>> be nicer to fill it with a semi-transparent color: is there a method to get 
>> this in some FLTK version?
>> 
>> 
> 
> I am interested in getting semi-transparent selection rectangles, i.e. 
> coloured boxes that allow to see widgets or text under them with a "blended" 
> colour (with any method!)
> I tried to rielaborate the image.cxx demo which uses alpha-blending, but I 
> don't get what I want: if I drag the "transparent" square over the sliders, 
> it covers completely them, even with alpha blending set.
> Am I completely wrong?


Can you describe more of what it is you hope to achieve?
I think I am not understanding your question, so if you cold outline what you 
want to do, that might help bring forth some suggestions.
Based on my current limited understanding of your intent, I am not sure what to 
suggest.

However, looking at the code fragment you posted, I think that trying to derive 
the transparent "overlay selection box" form Fl_Box is doomed to failure.

I think you would do better deriving your own window class, then in it's 
handle() method you can detect the mouse drag action, and in the derived draw() 
method you simply draw the window content as normal (i.e. call the base class 
draw()...) and then draw a translucent rectangle on top of it.

Something like that, anyway.

Though as I said above, I may be completely missing the point of what you are 
trying to do, of course...


> I read the docs on offscreen drawing but it seems a bit obscure (for me!). Is 
> there some example?

Um, not as such - though I have posted a few worked examples of fl_offscreen on 
this list in the past, so you might be able to find one of those (though I 
can't right now...!)




_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to