Print Job and LockFocus
Print Job and LockFocus
- Subject: Print Job and LockFocus
- From: Jeff LaMarche <email@hidden>
- Date: Mon, 25 Mar 2002 23:31:04 -0800
I'm adding "custom" printing (i.e. printing more involved than letting
the view print itself) to an application for the first time and have hit
something strange. I can't find this documented in the Printing docs,
but I might be missing something.
In the DrawRect of my view I attempt to draw into an NSImage by locking
focus on it then unlocking. My intent is to use the NSImage to "stamp"
several copies of the same image on the page based on some parameters.
This works fine as a screen view, but in a print operation it causes a
SIGNAL_BAD_EXC.
I'm assuming that changing the focus during a print operation is a
no-no, even though I couldn't find anywhere in the doc where it
explicitly stated that. So, am I limited to writing everything directly
to the view, or is there some way I can "legally" switch the focus to an
offscreen NSImage and draw into it and then return the focus to the view
being printed. Any thoughts or advice greatly appreciated.
Jeff
_______________________________________________
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.