Re: override drawRect
Re: override drawRect
- Subject: Re: override drawRect
- From: Ricky Sharp <email@hidden>
- Date: Thu, 18 Nov 2004 14:02:31 -0600
On Thursday, November 18, 2004, at 01:51PM, <email@hidden> wrote:
>Is it possible to override an NSView's ( or any of its subclasses)
>"drawRect:" method so that i can flip the coordinate system before its
>called? I want the graphicsContext to have a coordinate system much
>like that of a QuickDraw CGrafPtr.
It's probably not a good idea to do this. But if you have to, you can provide an implementation of isFlipped in your NSView subclasses that returns YES. Keep in mind though that you'll end up playing around with the CTM when it comes time to draw text.
Personally, I just work with whatever coordinate system is provided to me. I ask the view (or image) if it's flipped and do the right thing when drawing.
--
Rick Sharp
Instant Interactive(tm)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden