[wxMSW 2.8] alpha+antialiasing support
Chad Wagner
chad at chadawagner.com
Thu Aug 9 20:28:35 PDT 2007
I hope these aren't stupid questions, I'm usually on a Mac platform,
and I've searched for answers without any luck. Answers in the form
of "duh, look here" are happily accepted ;-p
My gui uses all custom controls, consisting of various bitmaps (png
with alpha), lines, splines, text, etc. all of which at some point
utilize the alpha channel. On Mac, I can draw a semi-transparent
line by setting the pen with a color using alpha e.g. dc.SetPen(wxPen
(wxColor(255,255,255,127))); dc.DrawLine(x1,y1,x2,y2); The line is
anti-aliased so it appears smooth, and the alpha value of the color
is used appropriately.
porting to wxMSW, this is not the case. the line is jagged and the
alpha is disregarded. is there a way to do this, is there a
different module or feature I need to enable, an entirely different
method I haven't thought of to circumvent the issue, or how is this
usually handled? is there something completely basic that I'm just
overlooking? (I'm also quite sleep-deprived!) It looks so terrible
I'm sure there has to be a way...
any advice is greatly appreciated.
thanks,
chad
More information about the wx-users
mailing list