From: Stefan Csomor Date: Tue, 25 Jun 2013 14:19:41 +0000 (+0000) Subject: support for scaled bitmaps in wxMemoryDC X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7e0fda87a9479a6dc71c037c539de119cec3f20d support for scaled bitmaps in wxMemoryDC git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74288 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/core/dcmemory.cpp b/src/osx/core/dcmemory.cpp index eabdc34f98..ce7d9e0591 100644 --- a/src/osx/core/dcmemory.cpp +++ b/src/osx/core/dcmemory.cpp @@ -76,8 +76,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 +101,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 {