comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Transparency in Bitmap buttons
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Transparency in Bitmap buttons [message #26321 is a reply to message #26320] Wed, 15 August 2001 12:00 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
JD Smith wrote:
>
> Has anyone had luck using the transparency feature of color-bitmap
> buttons?
>
> The manual quotes:
>
>>>> >>>>>>>>>>>>>
> Transparent Bitmaps
>
> For 16- and 256-color bitmaps, IDL uses the color of the pixel in the
> lower left corner as the transparent color. All pixels of this color
> become transparent, allowing the button color to show through. This
> allows you to use bitmaps that are not rectangular. If you have a
> rectangular bitmap that you want to use as a button label, you must
> either draw a border of a different color around the bitmap or save the
> bitmap as 24-bit (TrueColor). If your bitmap also contains text, make
> sure the border you draw is a different color than the text, otherwise
> the text color will become transparent.
> <<<<<<<<<<<<<<<<<
>
> But I'm unable to see this behavior.
>
> Try:
>
> IDL> base=widget_base(/COLUMN)
> IDL> but=widget_button(base,VALUE=filepath('zoom.bmp',$
> SUBDIR=['resource','bitmaps']),/BITMAP)
> IDL> widget_control, base, /realize
>
> Does the button blend into the background tranparently? On my system
> (x86 linux unix 5.4), it does not, despite this claim. Note that if you
> have a matching gray background it may appear to blend in (though
> without real transparency). Please note your system and version if
> responding.

Ummm, I couldn't really tell what I was supposed to see so I attached a gif of the result
(JD_button.gif). Background was gray. Button was gray. Is this a case of "appearing" to
blend in?

IDL> print, !version
{ x86 linux unix 5.4.1 Jan 16 2001 32 32}

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
Alexander Pope.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Transparency in Bitmap buttons
Next Topic: limits to mosaic function in ENVI 3.2?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:02:42 PDT 2025

Total time taken to generate the page: 0.00483 seconds