Made wxCairo graphics code compile again, wxGraphicsBitmap still missing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53347 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -196,6 +196,29 @@ public:
|
||||
instance, or indirectly using the static convenience CreateXXX functions of
|
||||
wxGraphicsContext that always delegate the task to the default renderer.
|
||||
|
||||
@code
|
||||
void MyCanvas::OnPaint(wxPaintEvent &event)
|
||||
{
|
||||
// Create paint DC
|
||||
wxPaintDC dc(this);
|
||||
|
||||
// Create graphics context from it
|
||||
wxGraphicsContext *gc = dc.CreateGraphicsContext();
|
||||
|
||||
// make a path that contains a circle and some lines, centered at 100,100
|
||||
wxGraphicsPath path = gc->CreatePath();
|
||||
path.AddCircle( 0.0, 0.0, 100.0 );
|
||||
path.MoveToPoint(0.0, -100.0);
|
||||
path.AddLineToPoint(0.0, 100.0);
|
||||
path.MoveToPoint(-100.0, 0.0);
|
||||
path.AddLineToPoint(100.0, 0);
|
||||
path.CloseSubpath();
|
||||
path.AddRectangle(-50.0, -25.0, 100.0, 50.0);
|
||||
|
||||
delete gc;
|
||||
@endcode
|
||||
|
||||
|
||||
@library{wxcore}
|
||||
@category{FIXME}
|
||||
|
||||
|
Reference in New Issue
Block a user