Re: override drawRect
Re: override drawRect
- Subject: Re: override drawRect
- From: "John C. Randolph" <email@hidden>
- Date: Thu, 18 Nov 2004 15:02:58 -0800
On Nov 18, 2004, at 11:50 AM, 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.
Well, overriding -drawRect: is what you'll need to do for any custom
drawing in the first place, and the coordinate system of your own view
is yours to manipulate as you like for your own convenience.
See the NSView documentation for -isFlipped, -scaleUnitSquareToSize:,
-setBoundsRotation:, and other methods that alter the view's coordinate
system.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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