Properly scaling a vector image with CG
Properly scaling a vector image with CG
- Subject: Properly scaling a vector image with CG
- From: Gwynne Raskind <email@hidden>
- Date: Sun, 24 May 2009 18:48:04 -0400
I have a UIView inside a UIScrollView. The UIView has a bunch of
CALayers with custom drawing code which render vector images. A nice
thing about vector images is that when you zoom in on them, they still
look good. But using UIScrollView's zooming support, I still get nasty
bitmap zooming - because UIScrollView is setting the transform
property of my view, which is transforming the contents of the view
without redrawing them. How can I manipulate the scaling so that my
drawing code can scale the drawing properly? I'm okay with it looking
blocky during the zoom animation, as long as it redraws prettily when
the zoom is done.
The only solution I can see right now is to track the user's zoom
gesture by hand and manipulate my view's bounds, scroll view's content
size, and layer scaling values by hand. This seems like a very ugly
solution which duplicates a lot of effort that UIScrollView puts in
for me.
Any thoughts? Any help is appreciated.
-- Gwynne, Daughter of the Code
"This whole world is an asylum for the incurable."
_______________________________________________
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