Re: Question about dataWithPDFInsideRect:
Re: Question about dataWithPDFInsideRect:
- Subject: Re: Question about dataWithPDFInsideRect:
- From: Benjamin Stiglitz <email@hidden>
- Date: Fri, 12 Sep 2008 12:29:16 -0400
Suppose I have a model (myModel) and its view (myModelView) which is
a subclass of NSView. myModel has an update method that updates the
model, and changes in the view are all drawn inside the drawRect:
method of myModelView. If I have the following sequence:
[ myModel update ];
[ myModelView setNeedsDisplay: YES ];
myModelViewData = [ myModelView dataWithPDFInsideRect: [ myModelView
bounds ] ];
Is the data I get back from dataWithPDFInsideRect: guaranteed to
reflect the last changes that stem from [ myModel update ]? Or is it
possible that I might get data that's essentially cached from a view
of the model from some previous state? Hope that makes sense.
Yes; -[NSView dataWithPDFInsideRect:] will create a PDF graphics
context and eventually end up calling -[NSView drawRect:] with the
passed bounds.
-Ben
_______________________________________________
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