• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
NSAffineTransform question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: NSAffineTransform question
      • From: "Janek Priimann" <email@hidden>
  • Prev by Date: Re: Using OpenSSL with the Security framework
  • Next by Date: text drawing question
  • Previous by thread: Re: Creating iDisk kind of application.
  • Next by thread: Re: NSAffineTransform question
  • Index(es):
    • Date
    • Thread