]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/core/dcmemory.cpp
avoid setting initial position if it was not specified, broken in r70734
[wxWidgets.git] / src / osx / core / dcmemory.cpp
index eabdc34f984be7f55e95e47c172155691267bc37..a7a47d6213789876823c899b530f3790833cdf83 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Stefan Csomor
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -76,8 +75,9 @@ void wxMemoryDCImpl::DoSelect( const wxBitmap& bitmap )
         if ( m_selected.GetDepth() != 1 )
             m_selected.UseAlpha() ;
         m_selected.BeginRawAccess() ;
-        m_width = bitmap.GetWidth();
-        m_height = bitmap.GetHeight();
+        m_width = bitmap.GetScaledWidth();
+        m_height = bitmap.GetScaledHeight();
+        m_contentScaleFactor = bitmap.GetScaleFactor();
         CGColorSpaceRef genericColorSpace  = wxMacGetGenericRGBColorSpace();
         CGContextRef bmCtx = (CGContextRef) m_selected.GetHBITMAP();
 
@@ -100,9 +100,9 @@ void wxMemoryDCImpl::DoGetSize( int *width, int *height ) const
     if (m_selected.IsOk())
     {
         if (width)
-            (*width) = m_selected.GetWidth();
+            (*width) = m_selected.GetScaledWidth();
         if (height)
-            (*height) = m_selected.GetHeight();
+            (*height) = m_selected.GetScaledHeight();
     }
     else
     {