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