Open Dobby233Liu opened 1 year ago
creation date = 2009-03-04T13:31:23.263-08:00
If you are interested in a quick fix, replace stuff in ZoomPictureBox.GetRectangle() with
retVal.X = (rect.Width - _image.Width) / Convert.ToInt32(2 * _zoom);
retVal.Y = (rect.Height - _image.Height) / Convert.ToInt32(2 * _zoom);
Note that you still relate to the form width/height, not the active draw area, which is smaller. And you should also add a minimum allowed size for the form, like 640x320.
creation date = 2009-03-05T05:04:03.12-08:00
I thought of using that simple technique, but I'd like to stay "mathematically pure" and stick with the Transforms so I can also implement rotation and other nifty things you can do with Transform matrices.
creation date =
2009-03-03T17:35:31.393-08:00
The "center image" in Anolis Resourcer doesn't calculate coordinates properly: when changing the zoom level the image is transformed relative to (0,0) rather than the center of the image itself. Also when centered and if the image is large enough it becomes impossible to see it all.