• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Printing an NSOpenGLView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Printing an NSOpenGLView
      • From: "Gerriet M. Denkmann" <email@hidden>
References: 
 >Printing an NSOpenGLView (From: "Gerriet M. Denkmann" <email@hidden>)

  • Prev by Date: Re: firstResponder and multiple NSTextFields
  • Next by Date: Red wiggly underline
  • Previous by thread: Printing an NSOpenGLView
  • Next by thread: Re: Printing an NSOpenGLView
  • Index(es):
    • Date
    • Thread