> thanks for your answer.
> I am writing to you directly,

Best not - I very seldom reply to off-list posts...

> will post solutions on list ; for now maybe there is a
> bit of misunderstanding, I try to explain better.

> The object is a bargraph, let's assume the "classic"
> vertical one ; a green rectangle on a white background.
> Can derive from Fl_Group or, better as you say, from Fl_Box.

> The problem comes when I want the white background to be
> invisible: I would like to see a green rectangle
> growing or shrinking representing a tank level.
> If the background is invisible I can place the object
> over a photo of a plant, for example.

OK: Then you need to composite the bar graph on top of the image.

Fltk does not provide support for transparent widgets (yet) as it is a hard 
thing to do in a consistent cross-platform way, so the best bet may be for you 
to just blit the image into the box, then render the bar on top of it.

This is easy and cheap to do, if you are rendering the graph on top of an image 
your app "owns".

If you want to render the graph transparently on top of (for example) the 
desktop then you are on your own out there, since fltk can't really do that 
without a lot of platform specific code...!

Hope that made sense!

FWIW, I think Greg's cheat pages have examples of doing some of this, so it 
would be worth a look...


Selex ES Ltd
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
A company registered in England & Wales.  Company no. 02426132
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
fltk mailing list

Reply via email to