cairo_set_font_face(ctext, m_font);
cairo_set_font_size(ctext, m_size );
#else
- cairo_select_font_face(ctext, m_fontName, m_slant, m_weights );
+ cairo_select_font_face(ctext, m_fontName, m_slant, m_weight );
cairo_set_font_size(ctext, m_size );
#endif
}
{
wxCHECK_RET( bmp.IsOk(), wxT("Invalid bitmap in wxCairoContext::DrawBitmap"));
+#ifdef wxHAS_RAW_BITMAP
int bw = m_width = bmp.GetWidth();
int bh = m_height = bmp.GetHeight();
wxBitmap bmpSource = bmp; // we need a non-const instance
}
}
m_pattern = cairo_pattern_create_for_surface(m_surface);
+#endif // wxHAS_RAW_BITMAP
}
wxCairoBitmapData::~wxCairoBitmapData()
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());
{
#ifdef __WXMSW__
return new wxCairoContext(this,(HDC)context);
-#endif
-#ifdef __WXGTK__
+#else
return new wxCairoContext(this,(cairo_t*)context);
#endif
}