Writing a freehand paint tool
Writing a freehand paint tool
- Subject: Writing a freehand paint tool
- From: "M. Uli Kusterer" <email@hidden>
- Date: Fri, 31 Oct 2003 20:57:28 +0100
Hi,
I'm doing a sort of "brush" paint tool. Since this painting needs to
be composited onto another image, I subclassed an NSImageView, and
gave that mouseDown: mouseDragged: and mouseUp: methods that add
lines to my image using NSBezierPath.
Sadly, the drawing feels very jerky and unresponsive. Any
suggestions from Quartz Gurus on how I can improve this?
Also, I can't seem to just lockFocus: on my image. The bezier path
doesn't show up. Instead, I seem to be forced to create a new
NSImage, composite the old NSImage into that, and then draw my bezier
path before unlocking focus again.
I must be overlooking something very simple, but right now NSImage
seems like an unpenetrable mystery to me...
--
Cheers,
M. Uli Kusterer
------------------------------------------------------------
"The Witnesses of TeachText are everywhere..."
http://www.zathras.de
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.