Anti-aliased graphics - recommendations?
Stefan Csomor
csomor at advancedconcepts.ch
Tue Sep 18 04:18:54 PDT 2007
Hi
>My paint handler now creates a dummy wxPaintDC, and then passes
>the window to wxGraphicsContext::Create.
>Is this the drill? Works ok on win XP but who knows...
not directly on the window, but rather on the dc, you can have a wxGCDC
( a wxDC interface working on an wxGraphicsContext) as an intermediate,
in case you have common wxDC calls
void MyCanvas::OnPaint(wxPaintEvent &WXUNUSED(event))
{
wxPaintDC pdc(this);
wxGCDC gdc( pdc ) ;
PrepareDC(dc);
...
or not needing the wxGCDC at all have the wxGraphicsContext::Create( pdc
) directly after the wxPaintDC is created
HTH
Stefan
More information about the wx-users
mailing list