Pixen/Pixen — pull request #254 by sarenji (2012-08-21 23:04:21+00:00)
Title: Add zoom via pinch gesture

This is my first time coding in Objective-C. Please critique and let me
know how to improve!

Addresses some issues in #225.

Redoes a few things about the zoom levels so that zooming via the pinch
gesture does not create 1000+ new zoom levels. As a result, zooming in
or out takes into account the current zoom level value and finds the
closest zoom level to zoom in/out to.

Also fixes a bug where zooming to level 3000%, manually changing the
zoom level to 3002%, then pressing enter twice would shift the canvas a
little. The reason was that convertFromViewToCanvasPoint was used
instead of convertFromViewToPartialCanvasPoint. The former floored the
center point, but if we want to zoom smoothly, the center point needs to
be a proper float value, rather than a truncated float.