• 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
Re: Problem with Grouping the rotated object.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Grouping the rotated object.


  • Subject: Re: Problem with Grouping the rotated object.
  • From: Quincey Morris <email@hidden>
  • Date: Wed, 2 Apr 2008 09:02:24 -0700


On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote:

NSAffineTransform* xform = [NSAffineTransform transform];

[currentContext saveGraphicsState];

[NSBezierPath clipRect:drawingBounds];

NSPoint center = NSMakePoint(NSMidX(stRect), NSMidY(stRect));

[xform translateXBy:center.x yBy:center.y];

[xform rotateByDegrees:[curGraphic GetAngle]];

[xform translateXBy:-center.x yBy:-center.y];

[xform concat];

This looks kind of wrong. Mathematically, wouldn't you want:

	[xform translateXBy:-center.x yBy:-center.y];
	[xform rotateByDegrees:[curGraphic GetAngle]];
	[xform translateXBy:center.x yBy:center.y];

?


_______________________________________________

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


References: 
 >Problem with Grouping the rotated object. (From: "Ghufran Ahamad" <email@hidden>)

  • Prev by Date: Re: prefPane with background process
  • Next by Date: Re: Subviews of a borderless window - autoresizing mask does not work for me
  • Previous by thread: Re: Problem with Grouping the rotated object.
  • Next by thread: Re: Problem with Grouping the rotated object.
  • Index(es):
    • Date
    • Thread