X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5789150456227cff15ca6526ccca7ad41fa6930..2adfb497e666354303ea6bb0e468f1e53811ad55:/contrib/src/canvas/canvas.cpp?ds=inline diff --git a/contrib/src/canvas/canvas.cpp b/contrib/src/canvas/canvas.cpp index 7a63dc0352..0cedafc946 100644 --- a/contrib/src/canvas/canvas.cpp +++ b/contrib/src/canvas/canvas.cpp @@ -51,6 +51,8 @@ FT_Library g_freetypeLibrary; // wxCanvasObject //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObject, wxEvtHandler) + wxCanvasObject::wxCanvasObject() { // the default event handler is just this object @@ -407,6 +409,8 @@ void wxCanvasObject::WriteSVG( wxTextOutputStream &stream ) // wxCanvasObjectGroup //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObjectGroup, wxCanvasObject) + wxCanvasObjectGroup::wxCanvasObjectGroup(double x, double y) { lworld.Translate(x,y); @@ -716,6 +720,8 @@ int wxCanvasObjectGroup::IndexOf( wxCanvasObject* obj ) // wxCanvasObjectRef //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasObjectRef, wxCanvasObject) + wxCanvasObjectRef::wxCanvasObjectRef(double x, double y, wxCanvasObject* obj) : wxCanvasObject() { @@ -880,6 +886,8 @@ wxCanvasObject* wxCanvasObjectRef::IsHitWorld( double x, double y, double margin // wxCanvasRect //---------------------------------------------------------------------------- +IMPLEMENT_CLASS(wxCanvasRect, wxCanvasObject) + wxCanvasRect::wxCanvasRect( double x, double y, double w, double h , double radius ) : wxCanvasObject() { @@ -1428,7 +1436,7 @@ void wxCanvasImage::Render(wxTransformMatrix* cworld, int clip_x, int clip_y, in if (cworld->GetRotation()) tmp = tmp.Rotate(-cworld->GetRotation()/180.0 * pi, centr, TRUE, NULL ); - bmp = tmp.ConvertToBitmap(); + bmp = wxBitmap(tmp); // create cached bitmap m_cBitmap = bmp; @@ -1658,7 +1666,7 @@ void wxCanvasText::Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int wxRect sub_rect( clip_x, clip_y, clip_width, clip_height ); wxBitmap sub_bitmap( bitmap->GetSubBitmap( sub_rect ) ); - wxImage image( sub_bitmap ); + wxImage image( sub_bitmap.ConvertToImage() ); // local coordinates int start_x = clip_x - tmparea.x; @@ -1695,7 +1703,7 @@ void wxCanvasText::Render(wxTransformMatrix* cworld, int clip_x, int clip_y, int } } - sub_bitmap = image.ConvertToBitmap(); + sub_bitmap = wxBitmap(image); wxDC *dc = m_admin->GetActive()->GetDC(); dc->DrawBitmap( sub_bitmap, clip_x, clip_y );