Re: Transforming NSBezierPaths using NSView
Re: Transforming NSBezierPaths using NSView
- Subject: Re: Transforming NSBezierPaths using NSView
- From: "Shawn Erickson" <email@hidden>
- Date: Thu, 22 Feb 2007 08:26:18 -0800
On 2/22/07, Nick Forge <email@hidden> wrote:
I have an app that allows you to draw ovals (this is the challenge in
Hillegass 2nd ed. pg 248) using a subclass of NSView (which I have
called MyView). I store the ovals as an NSMutableArray of
NSBezierPaths. Is there any way that I can make it so that when I
resize my window (and hence myView) the ovals stretch with the window?
Can I somehow use some sort of NSView method to transform the
NSBezierPaths to a standard NSView, then transform them to whatever
the current window of my myView instance is? Would it be easier to
store the ovals as NSRects instead, and do all the transformations on
the NSRects instead of the NSBezierPaths?
Consider...
<http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/Classes/NSBezierPath_Class/Reference/Reference.html#//apple_ref/occ/instm/NSBezierPath/transformUsingAffineTransform:>
For example...
[myArrayOfPaths
makeObjectsPerformSelector:@selector(transformUsingAffineTransform:)
withObject:myTranform];
-Shawn
_______________________________________________
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