First of all, you try to abuse
PictureBox
, as too many do. This control is totally useless, unless you want to do something very simple, in a very simplified way. In all other cases, it presents just hassled giving nothing in return. I'll tell you what to do instead.
Please see my past answers:
How do I clear a panel from old drawing[
^],
draw a rectangle in C#[
^],
Append a picture within picturebox[
^].
See also:
Drawing Lines between mdi child forms[
^],
capture the drawing on a panel[
^],
What kind of playful method is Paint? (DataGridViewImageCell.Paint(...))[
^],
How to speed up my vb.net application?[
^].
And magnification is done by
System.Drawing.Graphics.Transform
:
http://msdn.microsoft.com/en-us/library/system.drawing.graphics.transform.aspx[
^].
As to cropping, it's not needed at all (if you are not using
PictureBox
which will only screw up it :-)). For rendering (see above), use some control of required size, all rendering will be cropped by its bounds. As simple as that.
—SA