with XOffset and YOffset modified in mouseDrag simply by adding +1, -1
and zoomFactor a float value (usually 1.0f).
this works when zoomFactor is 1.0f (as expected) and draw a 640x480 image from a 640x480 window of the destImage with (XOffset, YOffset) origin.
However, if the zoomFactor become 2.0f (for example), I would expect the drawImage to still draw a 640x480 window from a 320x240 window of the destImage with (XOffset, YOffset) origin.
With the current code, all I have is a shifted (translated) and zoomed picture, not a zoomed picture.
I don’t know exactly. Previously, I used drawImage like above, but with drawImageTransformed, I must use -XOffset and -YOffset in the translation part (to get the same effect)
My case is a specific case (because sx = sy = 0), but if I want to draw the area (10, 15) -> (330, 255) of a 640x480 picture to (0,0)-(640x480), I guess the translation should be -10, -15, ie -dx, -dy.
Either drawImage is inconsistent, either the transform is inverted compared to my logic.