Re: NSAffineTransform
Re: NSAffineTransform
- Subject: Re: NSAffineTransform
- From: Graham Cox <email@hidden>
- Date: Mon, 25 Oct 2004 08:33:33 +1000
Store the path untransformed and store the scaling factors along with
it. Dragging the mouse just changes the stored scaling factors so it's
fast. Then when you draw the path, apply the transformation. The
original path is never changed.
--Graham
On 24 Oct 2004, at 2:39 am, Lorenzo wrote:
Hi there,
suppose that when I drag the mouse I want to resize dinamically a
NSBezierPath. Actually I do that resampling any point of the
bezierPath. And
it works, slowly but it works. Now I have just discovered that I can
use
NSAffineTransform.
NSAffineTransform *myTransform = [NSAffineTransform transform];
while(mouseDrag){
[myTransform scaleXBy:factorX scaleYBy:factorY];
[bezierPath transformUsingAffineTransform:myTransform];
// ...
}
but the problem is that once I apply the first scaling to the
bezierPath,
it became transformed thus the next scaling should pay attention to
the new
scale. The final (wrong) effect is that it keeps to resize double than
the
expected value. Do you suggest something in order to fix this problem?
Should I save the original bezierPath then duplicate and tranform the
bezierPath at any loop...?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden