Re: -[PDFView drawPage:] and Printing
Re: -[PDFView drawPage:] and Printing
- Subject: Re: -[PDFView drawPage:] and Printing
- From: Antonio Nunes <email@hidden>
- Date: Tue, 10 Feb 2009 15:19:57 +0100
On 10 Feb 2009, at 05:51, Kyle Sluder wrote:
Does PDFView refer to a view containing the enclosing scroll
view, or perhaps the scroll view itself? If so, why does -[PDFView
drawPage:] exist?
One use is that it can be overridden for all kinds of customization.
For instance, you may need to draw a selection rectangle during a drag
on a page. You could do that in PDFView's drawPage: method.
- (void)drawPage:(PDFPage *)page
{
// Draw the source PDFPage
[super drawPage:page];
// Draw whatever you want to appear on top of the page. E.g:
if (self.masterDocument.onScreenDisplayBoxes > 0) {
[self drawOnscreenDisplayBoxesForPage:page];
}
if (page == mouseDownPage) {
[self drawDraggingFeedbackOnPage:page];
}
}
-António
----------------------------------------------------
Energy is like a muscle,
it grows stronger through being used.
----------------------------------------------------
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden