Photosurface example: scale and rotate the frame, not the image
authorShawn Rutledge <shawn.rutledge@digia.com>
Tue, 9 Dec 2014 09:41:47 +0000 (10:41 +0100)
committerShawn Rutledge <shawn.rutledge@digia.com>
Tue, 23 Dec 2014 08:44:19 +0000 (09:44 +0100)
commit4c9eaa24a5d2c101b0afe9f605067e4d0c76f131
tree002372268925995fb1a119d44ca9d39ccea9f71d
parentcc904ba66c4eabe9f22ac3485d6e9dc75eddef35
Photosurface example: scale and rotate the frame, not the image

The size of the border around the image could otherwise change
dramatically, because the PinchArea was zooming the image.
It's conceivable that the frame could follow the image in scale and
rotation, but that doesn't work as long as the image is inside the
frame, because changing scale and rotation of the parent affects the
child too.  So it follows that the scale and rotation of the image
should never be directly set.  This helps the apparent size of the
white border around each image to be visually consistent.  Another
advantage is that the the image centroid doesn't tend to move,
so compensation is not necessary.

Change-Id: Ib7767e369097b32f006274add73ac544aedaf839
Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
examples/quick/demos/photosurface/photosurface.qml