mirror of
https://github.com/zhigang1992/PINRemoteImage.git
synced 2026-04-29 20:55:23 +08:00
Fix using NSGraphicsContext in creating a CGImage in NSImage category
This commit is contained in:
@@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
- (CGImageRef)CGImage
|
- (CGImageRef)CGImage
|
||||||
{
|
{
|
||||||
NSGraphicsContext *context = [[NSGraphicsContext currentContext] graphicsPort];
|
NSGraphicsContext *context = [NSGraphicsContext currentContext];
|
||||||
NSRect rect = NSMakeRect(0.0, 0.0, self.size.width, self.size.height);
|
NSRect rect = NSMakeRect(0.0, 0.0, self.size.width, self.size.height);
|
||||||
return [self CGImageForProposedRect:&rect context:context hints:NULL];
|
return [self CGImageForProposedRect:&rect context:context hints:NULL];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user