Re: Printing in OSX...
Re: Printing in OSX...
- Subject: Re: Printing in OSX...
- From: Donald Brown <email@hidden>
- Date: Mon, 17 Jun 2002 03:53:47 -0500
Your NSView subclass overrides drawRect to draw the whatever as needed. For
strings, there are commands to draw themselves into a rect. For NSImage,
there are a variety of draw commands. For rectangles and lines, there are
some functions to draw them, or NSBezierPath to go wild with.
As your program issues these draw commands, the printing system is recording
them and preparing to output them. They can output to a PDF file or to a
printer.
If you need to measure and lay out text, that becomes somewhat more
complicated.
As Scott said, if you are dealing just with text, the simplest solution is
to create a panel with an NSTextView that you never bring to the front.
Fill the NSTextView with your report contents, and use that for printing.
NSTextView does all the stuff I mentioned above.
Donald
on 6/17/02 12:12 AM, Jiva DeVoe at email@hidden wrote:
>
So how do I get the image/text/etc into the NSRect? The objective-c version
>
seems to just be an origin and a size... I can't tell how it would store
>
image data?
--
Donald Brown
email@hidden
http://www.eamontales.com
We have met the enemy and he is us - Pogo
_______________________________________________
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.