]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dc.cpp
updating positioning after embedding is set correctly
[wxWidgets.git] / src / mac / carbon / dc.cpp
index d9630ecbb9916fa48eb4d3465437582c81a40631..a46cf732404e26297a3ef7d18ef5c639568c30b7 100644 (file)
@@ -418,8 +418,12 @@ void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
 
     wxCoord xx = XLOG2DEVMAC(x);
     wxCoord yy = YLOG2DEVMAC(y);
+    wxCoord w = icon.GetWidth();
+    wxCoord h = icon.GetHeight();
+    wxCoord ww = XLOG2DEVREL(w);
+    wxCoord hh = YLOG2DEVREL(h);
 
-    Rect r = { yy , xx, yy + 32  , xx + 32 } ;
+    Rect r = { yy , xx, yy + hh  , xx + ww } ;
     PlotIconRef( &r , kAlignNone , kTransformNone , kPlotIconRefNormalFlags , MAC_WXHICON( icon.GetHICON() ) ) ;
 }
 
@@ -1343,6 +1347,10 @@ void  wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
         &chars , (ATSUStyle*) &m_macATSUIStyle , &atsuLayout ) ;
 
     wxASSERT_MSG( status == noErr , wxT("couldn't create the layout of the rotated text") );
+
+    status = ::ATSUSetTransientFontMatching( atsuLayout , true ) ;
+    wxASSERT_MSG( status == noErr , wxT("couldn't setup transient font matching") );
+
     int iAngle = int( angle );
     int drawX = XLOG2DEVMAC(x) ;
     int drawY = YLOG2DEVMAC(y) ;