I draw an NSImage within a custom NSView's drawRect: method

    [mImage drawInRect:imageRect...

It works well. The NSView lays on another NSView, which includes the page
area in the center and the working area, around the page. So when I draw an
image bigger than the page, I clearly see the whole image laying out of the
page. That's fine. When the user needs it, I have to display to the user the
page as it will be printed, so I need to cut off the parts of the image
laying out of the page. To achieve that, in the NSView's (with the mImage)
drawRect: method I simply add

    pagePath = [NSBezierPath bezierPathWithRect:pageRect];
    [pagePath addClip];

It works well when the NSView containing the mImage is not rotated. But if
the NSView is rotated, the [pagePath addClip]  seems to be ignored.
How to fix that?


Regards
-- Leonardo


_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to