Derive an object from ScrollableControl that paints the image.
In the OnPaint method, you can create a Matrix that defines the pan and zoom
of the object, then just draw the image as normal.
Here's a bit of code from a canvas class I wrote. It handles infinite
zooming and panning using the AutoScroll abilities of a scrollable control
in the OnPaint....
Matrix mx=new Matrix(_zoom,0,0,_zoom,0,0);
Size s=new
Size((int)(this.ClientSize.Width*(1f/_zoom)),(int)(this.ClientSize.Height*(1
f/_zoom)));
if(s.Width>PageSize.Width)
mx.Translate((s.Width/2)-(_pageSize.Width/2),0);
else
mx.Translate((float)this.AutoScrollPosition.X*(1f/_zoom),0);
if(s.Height>PageSize.Height)
mx.Translate(0,(s.Height/2)-(this._pageSize.Height/2)+(this.AutoScrollPositi
on.Y));
else
mx.Translate(0,(float)this.AutoScrollPosition.Y*(1f/_zoom));
e.Graphics.Transform=mx;
//Paint here...
HTH
--
Bob Powell [MVP]
Visual C#, System.Drawing
The Image Transition Library wraps up and LED style instrumentation is
available in the June of Well Formed for C# or VB programmers
http://www.bobpowell.net/currentissue.htm
Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm
The GDI+ FAQ RSS feed:
http://www.bobpowell.net/faqfeed.xml
Windows Forms Tips and Tricks RSS:
http://www.bobpowell.net/tipstricks.xml
Bob's Blog:
http://bobpowelldotnet.blogspot.com/atom.xml