Information Systems



How do I draw into a bitmap in wxWidgets?

wxMemoryDC dc;
wxBitmap bm(400, 400, dc);
dc.SelectObject(bm);
dc.SetBrush(wxBrush(wxColour(255,255,255)));
dc.DrawRectangle(0, 0, 399, 399);
dc.DrawLine(0, 0, 399, 399);
bm.SaveFile("c:/temp/test.jpg", wxBITMAP_TYPE_JPEG);