X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e3d7f7703ee16c35dca819794bec8bd730848cd0..960cb7d715a21b40d9d2472638a237b210683088:/src/cocoa/dcmemory.mm diff --git a/src/cocoa/dcmemory.mm b/src/cocoa/dcmemory.mm index 10b01be3b3..3bdb6dd67e 100644 --- a/src/cocoa/dcmemory.mm +++ b/src/cocoa/dcmemory.mm @@ -9,8 +9,11 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#include "wx/dcmemory.h" -#include "wx/log.h" +#include "wx/wxprec.h" +#ifndef WX_PRECOMP + #include "wx/log.h" + #include "wx/dcmemory.h" +#endif //WX_PRECOMP #import #import @@ -90,10 +93,12 @@ void wxMemoryDC::SelectObject( const wxBitmap& bitmap ) initWithSize:NSMakeSize(m_selectedBitmap.GetWidth(), m_selectedBitmap.GetHeight())]; [nsimage addRepresentation: const_cast(m_selectedBitmap).GetNSBitmapImageRep()]; + [m_cocoaNSImage lockFocus]; [nsimage drawAtPoint: NSMakePoint(0,0) fromRect: NSMakeRect(0.0,0.0,m_selectedBitmap.GetWidth(),m_selectedBitmap.GetHeight()) operation: NSCompositeCopy fraction: 1.0]; + [m_cocoaNSImage unlockFocus]; [nsimage release]; }