The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > Developer > Omni Frameworks
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
Use of Scaling Views for images... Thread Tools Search this Thread Display Modes
Hi

Just a general question about the Scaling View classes.

I am implementing a general image canvas and currently use the framework's scaling views and scrollviews. What is the benefit of using those classes for just one non-tiled image?

The -adjustScaleTo:canvasSize: method reframes and retiles if needed but it affects the scrollview zoomScale. As a consequence and under 3.2SDK at least, my attached CAShapeLayers (they track my selection rectangles etc...) also need to be re-scaled manually. Normally, the Bezier paths in my image sublayers are automagically re-scaled by zoomScale so zooming via SDK pinch gestures works as expected with no programmatic intervention. Forcing a zoomScale to 1, as the method does by setting the transform to Identity also re-scales image sublayer content: a side effect that now requires some code to re-sync to a new "effective" scale. One simply has to add a rectangular shape layer to the image to demonstrate this.

The method does track memory usage and sets "safe" margins for min and max scales. And the framework does have built-in "snapZoom" functionality which is neat. Are there any other visual benefits like less pixelation ? I don't notice any with a 320x480 image on an iPad. The overhead of manually re-scaling sublayer content bothers me a little. Maybe I'm missing something.
 
If you have a single bitmap image, the only benefit would be if that image is large (and you have some way to load subrects w/o loading the whole thing) or if you are going to zoom in for some reason. Most of the memory savings of tiling is going to be irrelevant if you've already loaded the complete image.

In the cases we use this for, the reseting of the scale factor to 1.0 (at the end of a zoom operation) means that we maintain a 1:1 user coordinate to pixel mapping when we regenerate our tiles. So, text, shapes and lines get bigger without aliasing. If you have a bitmap image, you might get some benefit from this if you want to see sharp lines between source pixels instead of some sort of blurred bilinear filtering, but that's about it.
__________________
CTO, The Omni Group
 
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Feature request: Smart Scaling (Text & Images) sharpeiboy OmniGraffle General 0 2010-03-16 06:40 AM
Scaling group without scaling (some) elements Rolf_schmolling OmniGraffle General 0 2008-04-09 12:35 AM
Loading all images doesn't load all images in 5.6 final Forrest OmniWeb Bug Reports 3 2007-10-26 08:59 AM
scaling attached images and graphics kristian OmniOutliner 3 for Mac 4 2007-05-25 01:45 PM
Scaling lsamberg OmniGraffle General 2 2006-07-21 04:12 AM


All times are GMT -8. The time now is 02:38 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.