Skip navigation.
 
mlRe: Problem with Grouping the rotated object.
FROM : Quincey Morris
DATE : Wed Apr 02 18:02:24 2008

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];

?

Related mailsAuthorDate
mlProblem with Grouping the rotated object. Ghufran Ahamad Apr 2, 13:00
mlRe: Problem with Grouping the rotated object. Jens Alfke Apr 2, 16:42
mlRe: Problem with Grouping the rotated object. Quincey Morris Apr 2, 18:02
mlRe: Problem with Grouping the rotated object. Gregory Weston Apr 2, 20:47