Re: Drawing inside an NSImage?
Re: Drawing inside an NSImage?
- Subject: Re: Drawing inside an NSImage?
- From: Markus Spoettl <email@hidden>
- Date: Mon, 09 Mar 2015 08:20:13 +0100
On 09/03/15 00:12, Patrick J. Collins wrote:
[_image lockFocus];
[[NSColor blueColor] set];
NSBezierPath *line = [NSBezierPath bezierPath];
NSPoint pointA = NSMakePoint(0, 0);
NSPoint pointB = NSMakePoint(self.bounds.size.width, 0);
[line moveToPoint:pointA];
[line lineToPoint:pointB];
[line stroke];
What am I doing wrong here?
If that's your real code, you need to call [_image unlockFocus] after you are
done painting the content of the image to balance the call to -lockFocus.
Regards
Markus
--
__________________________________________
Markus Spoettl
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden