Re: Issue with dataWithPDFInsideRect:
Re: Issue with dataWithPDFInsideRect:
- Subject: Re: Issue with dataWithPDFInsideRect:
- From: Brock Brandenberg <email@hidden>
- Date: Fri, 29 Mar 2002 13:04:32 -0600
Hi mmalc.
There is sufficient documentation to answer your question at:
file:///System/Library/Frameworks/AppKit.framework/Resources/English.lproj/
Documentation/Reference/ObjC_classic/Classes/NSView.html
I'd love to say you're right and the info is in there, but they've left
out something. I fully understand the relationship between the frame
rect, the bounds rect and the visible rect. We're using them just fine
to do all of our drawing, scaling, zooming, etc.
Here's the extent of the dataWithPDFInsideRect: description:
dataWithPDFInsideRect:
- (NSData *)dataWithPDFInsideRect:(NSRect)aRect
Returns PDF data that draws the region of the receiver within aRect.
This data can be placed on an NSPasteboard, written to a file, or
usedto create an NSImage object.
Interpreting the region of the receiver like that of the drawRect:
function, it will use the data from the canvas inside of "aRect". This
is apparently not correct. So I turn to the printing information.
Here's an interesting bit of info on printing:
To print an NSView, send it a print: message. You can also generate an
EPS representation using either dataWithEPSInsideRect: or
writeEPSInsideRect:toPasteboard:. For any of these jobs, the NSView
creates an NSPrintOperation object that manages the process of
generating proper code for a printer device. NSPageLayout, NSPrintInfo,
and NSPrintPanel objects are also involved in the process. See those
classes' specifications for more information on the printing process
itself.
It has a clue in the phrase "For any of these jobs", but if you override
any of the methods required for printing, none of them get called by the
dataWithPDFInsideRect: function.
So, dataWithPDFInsideRect: is doing something odd, getting info from
both the frame and the bounds rects.
mmalc, have you ever saved a PDF from a scaled frame rect? This is not a
novice question and the problem does not arise if you're writing a text
editor or currency converter. It only appears when trying to zoom the
canvas using differing frame and bounds rects.
Anyone know the emails or cell numbers of the developers who are
working on Cocoa drawing? Am I the only one this pissed about things?
You're the only one being this obnoxious about it. Grow up.
Sorry about sounding obnoxious, but it is impossible to get DTS help
within any reasonable amount of time. Some of the lists are moderated by
Apple and some are not. The PB list is wonderful, as is the Carbon list.
Apple doesn't seem to be providing any substantial Cocoa support for a
framework that has been around since basically 1988.
If you know something specific that can help, please point it out. But
please don't say "read the docs" unless you've encountered this issue
before and found the relevant information in the docs. If I've missed
something, say "look closer at printing" or whatever is appropriate.
Brock Brandenberg
----- industrial design @ bergdesign.com ------
_______________________________________________
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.