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];
?
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 mails | Author | Date |
|---|---|---|
| Ghufran Ahamad | Apr 2, 13:00 | |
| Jens Alfke | Apr 2, 16:42 | |
| Quincey Morris | Apr 2, 18:02 | |
| Gregory Weston | Apr 2, 20:47 |






Cocoa mail archive

