[wxruby-users] Transparent line in Frame

Andreas Warberg lists at ruby-forum.com
Mon Apr 21 08:39:36 EDT 2008


Hi

Thanks for a great GUI toolkit!

I want to draw transparent lines in a Frame. I have the following setup
but my lines are not transparent.

My colour object is created using:
   transparent_blue = Colour.new(0,0,255,100)

and I draw lines using a pen with this colour:
   @pen = Pen.new(transparent_blue)

In evt_paint of frame I have:
   dc.set_pen(@pen)
   dc.draw_line(x1,y1,x2,y2)

The line is blue but there is no transparency.

I set the alpha level to 100 where 255 is supposed to be completely
opaque.

I'm on Windows XP SP2 and

C:\>ruby --version
ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]

Please help!

Regards, Andreas
-- 
Posted via http://www.ruby-forum.com/.


More information about the wxruby-users mailing list