Re: How to determine when printing an NSView ?
Re: How to determine when printing an NSView ?
- Subject: Re: How to determine when printing an NSView ?
- From: Charles Jolley <email@hidden>
- Date: Thu, 18 Jul 2002 02:17:50 -0500
In fact it is quite easy. In -drawRect: use:
[NSGraphicsContext currentContextDrawingToScreen] ;
If it answers YES, you are drawing to screen, if NO, you are printing.
(Well, technically if you are trying to obtain the PDF/EPS data for the
view, the above will also return NO. If you are drawing into an image,
it will return YES, I believe.)
Cheers,
-Charles
On Thursday, July 18, 2002, at 01:11 AM, Ruben Smits wrote:
Hi,
As far as I know, it is not possible in Cocoa. The Cocoa printing
methods are too limited for that. I think the best way to do is to use
Carbon, as you mentioned. (You can mix Cocoa and Carbon code, but don't
mix Cocoa and Carbon code!)
HTH
Ruben Smits
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.