Re: Help for NSBezierPath.
Re: Help for NSBezierPath.
- Subject: Re: Help for NSBezierPath.
- From: Scott Thompson <email@hidden>
- Date: Thu, 29 Mar 2007 15:12:07 -0500
On Mar 29, 2007, at 1:36 PM, Jay wrote:
I'm just a new comer of cocoa, I need to deal with some GUI
involved with NSBezierPath, does anyone can share some basic sample
code about some GUI with this class, using objective-c. I just
wanna get some detailed feelings about the class, I read about the
demo given by apple, which integrated too much other detail, seems
too complicated to me:-(. Many thanks inadvance.
It sounds like you need an introduction to the drawing model that
NSBezierPath uses. NSBezierPath is just one aspect of that drawing
model. For UI work, in addition to NSBezierPath, you are likely to
also use NSColor, NSImage, and the various parts that make up the
NSText system.
If you would like an introduction to drawing using that model you can
start on-line at:
http://developer.apple.com/documentation/GraphicsImaging/Conceptual/
drawingwithquartz2d/dq_intro/chapter_1_section_1.html
If you glance through the NSBezierPath header as you read, you will
see that many of the same themes repeated in the Core Graphics text
are reflected, rather directly, through the NSBezierPath API.
I could humbly suggest the book I wrote:
http://www.amazon.com/Quartz-2D-Graphics-Mac-Developers/dp/0321336631
Or the book that David Gelphman at Apple wrote:
http://www.amazon.com/Programming-Quartz-Graphics-Kaufmann-Computer/
dp/0123694736
As well.
Mine is an introductory text that walks you through the drawing model
and is intended to help those who are moving from other graphics
models (like QuickDraw or GDI) learn how to draw with bezier paths
and such. David's book is a more thorough treatment of Quartz that
delves deeply into the ins-and-outs of the API. Along the way it
offers great tutorial information as well.
All of these sources focus more closely on the Quartz 2D library that
underlies NSBezierPath and friends. That means that typically they
express things in terms of CGContextMoveToPoint instead of
NSBezierPath's [moveToPoint:] method. Still, if you're just getting
started in Mac OS X's 2D graphics universe, learning the concepts and
how to apply them will be valuable in of itself.
Scott
_______________________________________________
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