]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/canvas/canvas.cpp
always let the multiline text control process the Enter key presses
[wxWidgets.git] / contrib / src / canvas / canvas.cpp
index 7a63dc03529c7e47fa479acb7a75afb2a18e444c..0cedafc9468083b60472beab11888461ed896c12 100644 (file)
@@ -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 );