NSAffineTransform question
NSAffineTransform question
- Subject: NSAffineTransform question
- From: "Ewan Delanoy" <email@hidden>
- Date: Wed, 25 Apr 2007 09:19:01 +0200 (CEST)
- Importance: Normal
Hello all,
I'm using NSAffineTransform to draw a rotated image in
a view. When I delete the NSAffineTransform part
in my code, I get the results i expect, but when I add the NSAffineTransform
instructions I see nothing at all in the view.
The relevant snippet (in the drawRect: method) goes :
/*version 1 : without the NSAffineTransform stuff */
[theImage drawInRect:drawingRect
fromRect:imageRect
operation:NSCompositeSourceOver
fraction:1.0];
/*version 2 */
NSAffineTransform* xform=[NSAffineTransform
transform];
[xform rotateByDegrees:90];
[xform concat];
[theImage drawInRect:drawingRect
fromRect:imageRect
operation:NSCompositeSourceOver
fraction:1.0];
[xform invert];
[xform concat];
Apart from that region, my code is identical
in the two cases. Did I put the instructions in the wrong order ?
Ewan
_______________________________________________
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