FROM : Ricky Sharp
DATE : Thu Nov 18 21:02:31 2004
On Thursday, November 18, 2004, at 01:51PM, <<email_removed>> 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)
DATE : Thu Nov 18 21:02:31 2004
On Thursday, November 18, 2004, at 01:51PM, <<email_removed>> 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)
| Related mails | Author | Date |
|---|---|---|
| alex | Nov 18, 20:50 | |
| Paolo Costabel | Nov 18, 20:58 | |
| Ricky Sharp | Nov 18, 21:02 | |
| John C. Randolph | Nov 19, 00:02 | |
| Wade Tregaskis | Nov 19, 10:00 |






Cocoa mail archive

