Couldn't draw polygon with wxDC:: DrawPolygon
Posted: Thu Mar 17, 2005 3:37 am
I use the following code to present a polygon:
wxDC dc;
wxPoint *points = GetPoints();
MyFrame *frame = new MyFrame();
frame->PrepareDC(dc);
dc.BeginDrawing();
dc.SetPen(*wxCYAN_PEN);
dc.DrawPolygon(size, points);
dc.EndDrawing();
frame->Show(true);
But the frame had not display any polygons, what was wrong?
wxDC dc;
wxPoint *points = GetPoints();
MyFrame *frame = new MyFrame();
frame->PrepareDC(dc);
dc.BeginDrawing();
dc.SetPen(*wxCYAN_PEN);
dc.DrawPolygon(size, points);
dc.EndDrawing();
frame->Show(true);
But the frame had not display any polygons, what was wrong?