Re: Scaling an entire CGPath?
Re: Scaling an entire CGPath?
- Subject: Re: Scaling an entire CGPath?
- From: "Henry McGilton (Boulevardier)" <email@hidden>
- Date: Wed, 22 Apr 2009 12:55:45 -0700
On Apr 22, 2009, at 11:25 AM, Maryanna Rogers wrote:
This path will never be drawn.
~m
On Wed, Apr 22, 2009 at 8:23 PM, David Duncan
<email@hidden> wrote:
On Apr 22, 2009, at 10:54 AM, Maryanna Rogers wrote:
I need to take a CGPath (a set of lines, curves, etc.) and scale the
entire thing as a whole. Is there a simple way to do this?
Do I need to use CGPathApply somehow?
Typically you would just scale the context that you are drawing the
path
to...
Without further information as to what you're trying to accomplish, we
can't see
what the real problem is.
Making some assumptions:
1. If you are constructing the path yourself, surely simple
multiplication of the
path coordinates by the scale factor(s) prior to adding the
specific element
to the path should do the trick.
2. If you have been handed a path and need to scale it, you can use
a Path
Applier function in conjunction with CGPathApply to play back
each element
of the path. See CGPathApply, CGPathApplierFunction, and
CGPathElement
for further details.
Cheers,
. . . . . . . . Henry
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please 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