ImageGlass.ImageBox.ScrollTo C# (CSharp) Method

ScrollTo() public method

Scrolls the control to the given point in the image, offset at the specified display point
public ScrollTo ( Point imageLocation, Point relativeDisplayPoint ) : void
imageLocation Point The point of the image to attempt to scroll to.
relativeDisplayPoint Point The relative display point to offset scrolling by.
return void
        public virtual void ScrollTo(Point imageLocation, Point relativeDisplayPoint)
        {
            int x;
            int y;

            x = Scale(imageLocation.X) - relativeDisplayPoint.X;
            y = Scale(imageLocation.Y) - relativeDisplayPoint.Y;

            AutoScrollPosition = new Point(x, y);
        }

Same methods

ImageBox::ScrollTo ( float x, float y, float relativeX, float relativeY ) : void
ImageBox::ScrollTo ( int x, int y, int relativeX, int relativeY ) : void
ImageBox