• 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
Re: Cropping NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cropping NSBezierPath


  • Subject: Re: Cropping NSBezierPath
  • From: Erik Buck <email@hidden>
  • Date: Wed, 3 Jan 2007 06:28:07 -0800 (PST)

You need to be more precise in your question.

Crop normally means to select a sub-rectangle of a larger rectangle.  If you want to do that, I suggest setting the frame and bounds of the view that you use to draw graphics.  The following link includes an example of cropping.
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaViewsGuide/Coordinates/chapter_3_section_3.html

  I don’t know what you mean by “particular part of bezier path”.  From the description of you application, you probably have many paths.  I suspect it is very inefficient to try and draw lots of disconnected shapes with a single path.

  Nevertheless, you may want to use clipping paths (which apply to graphics contexts).
http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/GraphicsContexts/chapter_3_section_3.html

  I highly recommend that you read an introductory graphics text book.  Cocoa/Quartz uses the Postscript/PDF imaging model which in turn is based on 40 years of computer graphics theory.  You might also enjoy the graphics chapters of "Cocoa Programming" http://www.amazon.com/exec/obidos/ASIN/0672322307/ref=ase_stepwisecom-20/104-8297687-8154346

I assume you are writing your SVG viewer as some kind of student project.  If not, consider using any available built-in SVG rendering support from Web Kit and/or PDF Kit.

_______________________________________________

Cocoa-dev mailing list (email@hidden)

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

  • Prev by Date: Re: Confusing terms - menu/menubar
  • Next by Date: Re: Confusing terms - menu/menubar
  • Previous by thread: Cropping NSBezierPath
  • Next by thread: Re: LineForm's Filters Table
  • Index(es):
    • Date
    • Thread