[Drawkit] Zoom to bounding box
Michael Caron
michael.r.caron at gmail.com
Thu Apr 2 22:05:07 PDT 2009
I did see in GCZoomView that there was something called "ZoomToRect".
It didn't work as I expected it to, however. I'm loading a document
from an archived state and when I try to look for the current drawing
view from the DKDrawingView class method "currentlyDrawingView", I get
a nil back. How does one get the current view so that I can do one of
these ZoomToRect calls?
In the end I just decided to crop the drawing to the shape. I'm new to
the framework, so my implementation is probably a bit crude. I keep an
array of the drawable objects in my drawing so that I can translate
them to new coordinates after resizing the drawing to the size of the
bounding box. To translate all the objects, I just used the -(void)
DKDrawableObject offsetLocationByX:byY: method.
I had tried to use the AffineTransforms, but they didn't appear to do
anything. Is there a special way to use those? After you apply a
transform to all objects in a layer, is there something else you have
to do?
Cheers,
Michael
------------------------------------------------
michael.r.caron at gmail.com
http://techrad.wordpress.com
http://mrcaron.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20090403/83d1ada5/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://lists.apptree.net/pipermail/drawkit-apptree.net/attachments/20090403/83d1ada5/attachment.pgp>
More information about the Drawkit
mailing list