I'm using a wxGraphicsContext to make some anti-aliased drawing in a bitmap.
I want to draw a kind of donut with the hole and the outside transparent.
All I can have is a donut with a black hole and a black outside.
Here is my code (obviously, using the transparent brush is not the thing to do):
Code: Select all
bitmap.Create(9, 9);
wxMemoryDC dc(bitmap);
wxGraphicsContext *gc = wxGraphicsContext::Create(dc);
bool bAntiAlias = gc->SetAntialiasMode(wxANTIALIAS_DEFAULT);
wxPen pen(DONUT_COLOR, 2);
gc->SetPen(pen);
gc->SetBrush(*wxTRANSPARENT_BRUSH);
gc->DrawEllipse(0, 0, 9, 9);
dc.SelectObject(wxNullBitmap);
delete gc;
Best regards,
Pascal
Edit: Sorry for posting on the wrong forum