Alphacolor in wxPen definition
Ian Britten
britten at caris.com
Thu Sep 7 06:54:53 PDT 2006
Robin Dunn wrote:
>> i would like to draw semi transparent lines, filled rectangles over
>> existing image.
>> in c# i construct pen with alphacolor (color with defined alpha channel)
>>
>> Pen transPen = new Pen(Color.FromArgb(23,100, 140, 140), 10);
>>
>> and do the painting.
>>
>> But i've noticed that wxColor has no FromArgb or similar method.
>> Is it possible to do transparent painting (this way) using wxWidgets?
>> If not, how should i do this?
>
>
> Alpha drawing support is in the process of being added to the wx 2.7
> branch of CVS. Currently you can do the things you describe on OS X.
Can you elaborate some (or point me to info/docs/demos/etc...)?
I am very interested in this functionality (Thought I was gonna have
to rewrite everything using Cairo!), and am interested in what will
be functionally possible (or not), performance concerns (fallback
implementations, etc), compositing behaviour, estimated availability,
etc, etc !
My Utopian hope is that I can (for example) simply define a colour
with a 50% alpha, and then simply drawing a Polygon with that Colour
set into a Brush, would get the result that I would expect - Namely,
a partially transparent polygon over any underlying data.
[ Yes, I know this effect can be achieved by pulling in other toolkits,
wxImage/wxBitmap tricks, etc, etc... However, I'm hoping this will
allow this sort of functionality without all that extra work! ]
Thanks for any info!
Ian
More information about the wx-users
mailing list