• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Writing a freehand paint tool
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.
  • Follow-Ups:
    • Re: Writing a freehand paint tool
      • From: John Randolph <email@hidden>
  • Prev by Date: NSArrayController help
  • Next by Date: Sorting Tables in Panther
  • Previous by thread: OT: What is ipulse-ics on Panther
  • Next by thread: Re: Writing a freehand paint tool
  • Index(es):
    • Date
    • Thread