Use wxBitmap::GetNSImage() in wxDC::DrawBitmap. Mask support now works.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24875 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -481,12 +481,11 @@ void wxDC::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask)
|
|||||||
[transform concat];
|
[transform concat];
|
||||||
[flipTransform concat];
|
[flipTransform concat];
|
||||||
|
|
||||||
NSImage *nsimage = [[NSImage alloc]
|
NSImage *nsimage = [bmp.GetNSImage(useMask) retain];
|
||||||
initWithSize:NSMakeSize(bmp.GetWidth(), bmp.GetHeight())];
|
|
||||||
[nsimage addRepresentation: const_cast<wxBitmap&>(bmp).GetNSBitmapImageRep()];
|
|
||||||
[nsimage drawAtPoint: NSMakePoint(0,0)
|
[nsimage drawAtPoint: NSMakePoint(0,0)
|
||||||
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
|
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
|
||||||
operation: NSCompositeCopy
|
operation: NSCompositeSourceOver
|
||||||
fraction: 1.0];
|
fraction: 1.0];
|
||||||
|
|
||||||
[nsimage release];
|
[nsimage release];
|
||||||
|
Reference in New Issue
Block a user