As you said, your logic for scaling is wrong. And this is wrong due to how the transformation matrices work.
, , , , .
- , - .
, ( ) 100 * 100 , , "" 200 * 200 . , , , , .
, 0 (. (/) - . (/)), 0 100.
. , TranslateTransform Graphics , :
e.Graphics.TranslateTransform(panel.With / 2 - content.Width / 2, panel.Height / 2 - content.Height / 2);
, , ! !
, . -, , , , 50.
, , , TranslateTransform. , (, ).
e.Graphics.TranslateTransform(panel.With / 2 - content.Width / 2, panel.Height / 2 - content.Height / 2);
e.Graphics.TranslateTransform(hScrollBar1.Value - (hScrollbar1.Maximum / 2), vScrollBar1.Value - (vScrollbar1.Maximum / 2));
, , , , , 0, -Maximum/2 Maximum/2, -50 50.
, , , , .
, , , .
, , /10f, , 1 100, 0,1 10, .
, 10, .
, , , , .
, , ( ), .
e.Graphics.TranslateTransform(panel.With / 2 - content.Width / 2, panel.Height / 2 - content.Height / 2);
e.Graphics.TranslateTransform(hScrollBar1.Value - (hScrollbar1.Maximum / 2), vScrollBar1.Value - (vScrollbar1.Maximum / 2));
float scale = zScrollBar.Value / 10f;
e.Graphics.ScaleTransform(scale, scale);
, , ! . ? , , ( ), (, , ):
float scale = zScrollBar.Value / 10f;
e.Graphics.TranslateTransform(panel.With / 2 - ((content.Width / 2) * scale), panel.Height / 2 - ((content.Height / 2) * scale));
e.Graphics.TranslateTransform((hScrollBar1.Value - (hScrollbar1.Maximum / 2)) * scale, (vScrollBar1.Value - (vScrollbar1.Maximum / 2)) * scale);
e.Graphics.ScaleTransform(scale, scale);
, , , .
, , , , , , , .
!
PD: , , , ( , ) .