[wxMSW 2.8] alpha+antialiasing support
Bill Baxter
wbaxter at gmail.com
Thu Aug 9 20:43:37 PDT 2007
First, you need to enable wxGraphicsContext in setup.h when you build
wxWidgets on MSW. And you need to use wxGCDC (or wxGraphicsContext)
to do your drawing.
--bb
On 8/10/07, Chad Wagner <chad at chadawagner.com> wrote:
> 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
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
>
>
More information about the wx-users
mailing list