gc->PopState();
}
gc->PopState();
+
+ gc->PushState();
+ gc->Translate(60, 400);
+ gc->DrawText("Scaled smiley inside a square", 0, 0);
+ gc->DrawRectangle(BASE2, BASE2, 100, 100);
+ gc->DrawBitmap(m_smile_bmp, BASE2, BASE2, 100, 100);
+ gc->PopState();
}
-#endif
+#endif // wxUSE_GRAPHICS_CONTEXT
void MyCanvas::DrawCircles(wxDC& dc)
{
wxDouble scaleX = w / size.GetWidth();
wxDouble scaleY = h / size.GetHeight();
- cairo_scale(m_context, scaleX, scaleY);
// prepare to draw the image
cairo_translate(m_context, x, y);
+ cairo_scale(m_context, scaleX, scaleY);
cairo_set_source(m_context, pattern);
// use the original size here since the context is scaled already...
cairo_rectangle(m_context, 0, 0, size.GetWidth(), size.GetHeight());