Re: Printing an NSOpenGLView
Re: Printing an NSOpenGLView
- Subject: Re: Printing an NSOpenGLView
- From: Michael Clark <email@hidden>
- Date: Thu, 25 Aug 2005 00:32:32 -0400
On 20-Aug-05, at 7:38 PM, Gerriet M. Denkmann wrote:
1. question: How does the drawRect: method know that it is printing?
Obviously in this case it must do something completely different.
You can check this: [[NSGraphicsContext currentContext]
isDrawingToScreen]
2. question: What should the drawRect: do when it has figured out
it is printing?
I am not sure where ogl is concerned. but you might want to do some
pagination. Your view can override
- (BOOL)knowsPageRange: (NSRangePointer)aRange
and in there you can alter the range to correspond with how many
pages you have.
Then in your draw rect you can ask: [[NSPrintOperation
currentOperation] currentPage] to find out what page is drawing, and
draw it.
That is just an example.
But, I am not sure if you have to do anything special because of ogl.
Michael.
_______________________________________________
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