GIDForums  

Go Back   GIDForums > Computer Programming Forums > FLTK Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 09-Jun-2006, 15:21
Bobnoxous Bobnoxous is offline
New Member
 
Join Date: Jun 2006
Location: Orange County, CA
Posts: 1
Bobnoxous is on a distinguished road

Draw text with transparent background


Hello. I'm trying to print text on a button graphic. I'd like the graphic to show around the text. This way, I can use 1 graphic for the buttons, and change the text on top the button as needed. It will also help with internationalization, hopefully.

Is there a way to draw text such that the background shows through? I can create a TextDisplay and print text, but the box is opaque. I cannot figure out how to do transparency, except as a PNG image with a transparent color. Any suggestions?

I am new to FLTK, and maybe I've missed something obvious, but I cannot find a way to do this in the FLTK docs (I'm using 1.7) or in these forums. Thanks.
  #2  
Old 24-Aug-2006, 08:47
MatthiasWM MatthiasWM is offline
VIP
 
Join Date: Nov 2004
Posts: 62
MatthiasWM will become famous soon enough

Re: Draw text with transparent background


Text in FLTK is always drawn without background. What you are probably seeing is a boxtype (Fl_Boxtype, Fl_Widget::box()) that erases your background drawing. You may have to introduce a new boxtype to draw your image based boxes. There are a few implementations of this in the "links" section of fltk.org.
 
 

Recent GIDBlogToyota - 2009 May Promotion by Nihal

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to read unknown total of int data from text file to a 2-dim array in C or C++? ladyscarlet99 C Programming Language 2 09-Sep-2005 15:07
need help on text file analyser ffantasy C Programming Language 1 05-Sep-2005 14:44
saving html text dopee MySQL / PHP Forum 1 17-Jan-2005 05:15
CD burner wont burn!! robertli55 Computer Hardware Forum 1 18-Jun-2004 11:53
Yet another CD burner problem: Lite-On LSC-24082K Erwin Computer Hardware Forum 1 22-May-2004 12:28

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:24.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.