RE: Problem with Grouping the rotated object

2008-04-03 Thread Ghufran Ahamad
: Re: Problem with Grouping the rotated object Let me explain how we are handling grouped objects. We have only one basic type of draw object with a dictionary of characteristics. That gives a lot of flexibility. We do not let objects draw themselves. Instead, we use a separate rendering object

Re: Problem with Grouping the rotated object

2008-04-02 Thread Gordon Apple
Let me explain how we are handling grouped objects. We have only one basic type of draw object with a dictionary of characteristics. That gives a lot of flexibility. We do not let objects draw themselves. Instead, we use a separate rendering object. This results in a clean object data model.

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Gregory Weston
Quincey Morris wrote: On Apr 2, 2008, at 04:00, Ghufran Ahamad wrote: [xform translateXBy:center.x yBy:center.y]; [xform rotateByDegrees:[curGraphic GetAngle]]; [xform translateXBy:-center.x yBy:-center.y]; This looks kind of wrong. Mathematically, wouldn't you want: [xform translate

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Quincey Morris
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]; [xf

Re: Problem with Grouping the rotated object.

2008-04-02 Thread Jens Alfke
That's not enough code to go on — it's not showing all the drawing. Are you remembering to restore the saved graphics state after you finish drawing an object? Also, if you could paste in the code without the extra blank lines, it would make it more readable. —Jens smime.p7s Description: