: 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
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.
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
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
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: