C# Class ImageGlass.ImageBox

Inheritance: System.Windows.Forms.Control
显示文件 Open project: d2phap/ImageGlass

Private Properties

Property Type Description
Clamp int
DefineViewSize void
GetImageSize System.Drawing.Size
GetZoomLevel int
InitializeGridTile void
OnFrameChangedHandler void
PerformActualSize void
PerformZoom void
PerformZoom void
PerformZoomIn void
PerformZoomOut void
ScrollBarScrollHandler void
SetZoom void
ShouldShowScrollbar bool
UpdateScrollbars void

Public Methods

Method Description
ActualSize ( ) : void

Resets the zoom to 100%.

BeginUpdate ( ) : void

Disables any redrawing of the image box

CenterAt ( Point imageLocation ) : void

Centers the given point in the image in the center of the control

CenterAt ( float x, float y ) : void

Centers the given point in the image in the center of the control

CenterAt ( int x, int y ) : void

Centers the given point in the image in the center of the control

CenterToImage ( ) : void

Resets the viewport to show the center of the image.

CreateCheckerBoxTile ( ) : Bitmap

Creates a checked tile texture using default values.

CreateCheckerBoxTile ( int cellSize, Color cellColor, Color alternateCellColor ) : Bitmap

Creates a bitmap image containing a 2x2 grid using the specified cell size and colors.

EndUpdate ( ) : void

Enables the redrawing of the image box

FitRectangle ( Rectangle rectangle ) : Rectangle

Fits a given T:System.Drawing.Rectangle to match image boundaries

FitRectangle ( RectangleF rectangle ) : RectangleF

Fits a given T:System.Drawing.RectangleF to match image boundaries

GetImageViewPort ( ) : Rectangle

Gets the image view port.

GetInsideViewPort ( ) : Rectangle

Gets the inside view port, excluding any padding.

GetInsideViewPort ( bool includePadding ) : Rectangle

Gets the inside view port.

GetOffsetPoint ( Point source ) : Point

Returns the source T:System.Drawing.Point repositioned to include the current image offset and scaled by the current zoom level

GetOffsetPoint ( int x, int y ) : Point

Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level

GetOffsetPoint ( PointF source ) : PointF

Returns the source T:System.Drawing.PointF repositioned to include the current image offset and scaled by the current zoom level

GetOffsetPoint ( float x, float y ) : PointF

Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level

GetOffsetRectangle ( Rectangle source ) : Rectangle

Returns the source T:System.Drawing.Rectangle scaled according to the current zoom level and repositioned to include the current image offset

GetOffsetRectangle ( int x, int y, int width, int height ) : Rectangle

Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset

GetOffsetRectangle ( RectangleF source ) : RectangleF

Returns the source T:System.Drawing.RectangleF scaled according to the current zoom level and repositioned to include the current image offset

GetOffsetRectangle ( float x, float y, float width, float height ) : RectangleF

Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset

GetPreferredSize ( Size proposedSize ) : Size

Retrieves the size of a rectangular area into which a control can be fitted.

GetScaledPoint ( Point source ) : Point

Returns the source T:System.Drawing.Point scaled according to the current zoom level

GetScaledPoint ( int x, int y ) : Point

Returns the source T:System.Drawing.Point scaled according to the current zoom level

GetScaledPoint ( PointF source ) : PointF

Returns the source T:System.Drawing.PointF scaled according to the current zoom level

GetScaledPoint ( float x, float y ) : PointF

Returns the source T:System.Drawing.Point scaled according to the current zoom level

GetScaledRectangle ( Point location, Size size ) : Rectangle

Returns the source rectangle scaled according to the current zoom level

GetScaledRectangle ( Rectangle source ) : Rectangle

Returns the source T:System.Drawing.Rectangle scaled according to the current zoom level

GetScaledRectangle ( int x, int y, int width, int height ) : Rectangle

Returns the source rectangle scaled according to the current zoom level

GetScaledRectangle ( PointF location, SizeF size ) : RectangleF

Returns the source rectangle scaled according to the current zoom level

GetScaledRectangle ( RectangleF source ) : RectangleF

Returns the source T:System.Drawing.RectangleF scaled according to the current zoom level

GetScaledRectangle ( float x, float y, float width, float height ) : RectangleF

Returns the source rectangle scaled according to the current zoom level

GetScaledSize ( Size source ) : Size

Returns the source T:System.Drawing.Size scaled according to the current zoom level

GetScaledSize ( int width, int height ) : Size

Returns the source size scaled according to the current zoom level

GetScaledSize ( SizeF source ) : SizeF

Returns the source T:System.Drawing.SizeF scaled according to the current zoom level

GetScaledSize ( float width, float height ) : SizeF

Returns the source size scaled according to the current zoom level

GetSelectedImage ( ) : Image

Creates an image based on the current selection region

The caller is responsible for disposing of the returned image

GetSourceImageRegion ( ) : RectangleF

Gets the source image region.

ImageBox ( ) : System

Initializes a new instance of the ImageBox class.

IsPointInImage ( Point point ) : bool

Determines whether the specified point is located within the image view port

IsPointInImage ( float x, float y ) : bool

Determines whether the specified point is located within the image view port

IsPointInImage ( int x, int y ) : bool

Determines whether the specified point is located within the image view port

PointToImage ( Point point ) : Point

Converts the given client size point to represent a coordinate on the source image.

PointToImage ( Point point, bool fitToBounds ) : Point

Converts the given client size point to represent a coordinate on the source image.

PointToImage ( float x, float y ) : Point

Converts the given client size point to represent a coordinate on the source image.

PointToImage ( float x, float y, bool fitToBounds ) : Point

Converts the given client size point to represent a coordinate on the source image.

PointToImage ( int x, int y ) : Point

Converts the given client size point to represent a coordinate on the source image.

PointToImage ( int x, int y, bool fitToBounds ) : Point

Converts the given client size point to represent a coordinate on the source image.

ScrollTo ( Point imageLocation, Point relativeDisplayPoint ) : void

Scrolls the control to the given point in the image, offset at the specified display point

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

Scrolls the control to the given point in the image, offset at the specified display point

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

Scrolls the control to the given point in the image, offset at the specified display point

SelectAll ( ) : void

Creates a selection region which encompasses the entire image

SelectNone ( ) : void

Clears any existing selection region

StartAnimating ( ) : void

Stop animating

StopAnimating ( ) : void

Start animating

ZoomAuto ( ) : void

[PHAP] Zooms to the maximum size for displaying the entire image within the bounds of the control. If image size is smaller than viewer size, keep its original size.

ZoomIn ( ) : void

Zooms into the image

ZoomIn ( bool preservePosition ) : void

Zooms into the image

ZoomOut ( ) : void

Zooms out of the image

ZoomOut ( bool preservePosition ) : void

Zooms out of the image

ZoomToFit ( ) : void

Zooms to the maximum size for displaying the entire image within the bounds of the control.

ZoomToRegion ( RectangleF rectangle ) : void

Adjusts the view port to fit the given region

ZoomToRegion ( float x, float y, float width, float height ) : void

Adjusts the view port to fit the given region

ZoomToRegion ( int x, int y, int width, int height ) : void

Adjusts the view port to fit the given region

Protected Methods

Method Description
AdjustLayout ( ) : void

Adjusts the layout.

AdjustScroll ( int x, int y ) : void

Adjusts the scroll.

AdjustSize ( ) : void

Adjusts the size.

AdjustViewPort ( ) : void

Adjusts the view port.

CreateGridTileImage ( int cellSize, Color firstColor, Color secondColor ) : Bitmap

Creates the grid tile image.

Dispose ( bool disposing ) : void

Clean up any resources being used.

DrawBackground ( PaintEventArgs e ) : void

Draws the background of the control.

DrawDropShadow ( Graphics g, Rectangle viewPort ) : void

Draws a drop shadow.

DrawGlowShadow ( Graphics g, Rectangle viewPort ) : void

Draws a glow shadow.

DrawImage ( Graphics g ) : void

Draws the image.

DrawImageBorder ( Graphics graphics ) : void

Draws a border around the image.

DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds ) : void

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.

DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText ) : void

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.

DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText, Padding padding ) : void

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.

DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, Rectangle bounds ) : void

Draws the specified text within the specified bounds using the specified device context, font, color, and back color.

DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Rectangle bounds ) : void

Draws the specified text within the specified bounds using the specified device context, font, and color.

DrawLabel ( Graphics graphics, string text, Font font, Rectangle bounds ) : void

Draws the specified text within the specified bounds using the specified device context and font.

DrawLabel ( Graphics graphics, string text, Rectangle bounds ) : void

Draws the specified text within the specified bounds using the specified device context.

DrawPixelGrid ( Graphics g ) : void

Draws a pixel grid.

DrawSelection ( PaintEventArgs e ) : void

Draws the selection region.

DrawText ( PaintEventArgs e ) : void

Draws the text.

EndDrag ( ) : void

Completes an ongoing selection or drag operation.

GetImageBorderOffset ( ) : int

Gets an offset based on the current image border style.

GetInterpolationMode ( ) : InterpolationMode

Determines a suitable interpolation mode based in the value of the InterpolationMode and Zoom properties.

IsInputKey ( Keys keyData ) : bool

Determines whether the specified key is a regular input key or a special key that requires preprocessing.

OnAllowClickZoomChanged ( EventArgs e ) : void

Raises the AllowClickZoomChanged event.

OnAllowDoubleClickChanged ( EventArgs e ) : void

Raises the AllowDoubleClickChanged event.

OnAllowUnfocusedMouseWheelChanged ( EventArgs e ) : void

Raises the AllowUnfocusedMouseWheelChanged event.

OnAllowZoomChanged ( EventArgs e ) : void

Raises the AllowZoomChanged event.

OnAutoCenterChanged ( EventArgs e ) : void

Raises the AutoCenterChanged event.

OnAutoPanChanged ( EventArgs e ) : void

Raises the AutoPanChanged event.

OnBackColorChanged ( EventArgs e ) : void

Raises the System.Windows.Forms.Control.BackColorChanged event.

OnBorderStyleChanged ( EventArgs e ) : void

Raises the BorderStyleChanged event.

OnDockChanged ( EventArgs e ) : void

Raises the System.Windows.Forms.Control.DockChanged event.

OnDropShadowSizeChanged ( EventArgs e ) : void

Raises the DropShadowSizeChanged event.

OnFontChanged ( EventArgs e ) : void

Raises the E:System.Windows.Forms.Control.FontChanged event.

OnForeColorChanged ( EventArgs e ) : void

Raises the E:System.Windows.Forms.Control.ForeColorChanged event.

OnGridCellSizeChanged ( EventArgs e ) : void

Raises the GridCellSizeChanged event.

OnGridColorAlternateChanged ( EventArgs e ) : void

Raises the GridColorAlternateChanged event.

OnGridColorChanged ( EventArgs e ) : void

Raises the GridColorChanged event.

OnGridDisplayModeChanged ( EventArgs e ) : void

Raises the GridDisplayModeChanged event.

OnGridScaleChanged ( EventArgs e ) : void

Raises the GridScaleChanged event.

OnHorizontalScrollBarStyleChanged ( EventArgs e ) : void

Raises the HorizontalScrollBarStyleChanged event.

OnImageBorderColorChanged ( EventArgs e ) : void

Raises the ImageBorderColorChanged event.

OnImageBorderStyleChanged ( EventArgs e ) : void

Raises the ImageBorderStyleChanged event.

OnImageChanged ( EventArgs e ) : void

Raises the ImageChanged event.

OnInterpolationModeChanged ( EventArgs e ) : void

Raises the InterpolationModeChanged event.

OnInvertMouseChanged ( EventArgs e ) : void

Raises the InvertMouseChanged event.

OnKeyDown ( KeyEventArgs e ) : void

Raises the System.Windows.Forms.Control.KeyDown event.

OnLimitSelectionToImageChanged ( EventArgs e ) : void

Raises the LimitSelectionToImageChanged event.

OnMouseDown ( MouseEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseDown event.

OnMouseMove ( MouseEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseMove event.

OnMouseUp ( MouseEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseUp event.

OnMouseWheel ( MouseEventArgs e ) : void

Raises the System.Windows.Forms.Control.MouseWheel event.

OnPaddingChanged ( EventArgs e ) : void

Raises the System.Windows.Forms.Control.PaddingChanged event.

OnPaint ( PaintEventArgs e ) : void

Raises the System.Windows.Forms.Control.Paint event.

OnPanEnd ( EventArgs e ) : void

Raises the PanEnd event.

OnPanStart ( CancelEventArgs e ) : void

Raises the PanStart event.

OnParentChanged ( EventArgs e ) : void

Raises the System.Windows.Forms.Control.ParentChanged event.

OnPixelGridColorChanged ( EventArgs e ) : void

Raises the PixelGridColorChanged event.

OnPixelGridThresholdChanged ( EventArgs e ) : void

Raises the PixelGridThresholdChanged event.

OnResize ( EventArgs e ) : void

Raises the System.Windows.Forms.Control.Resize event.

OnScaleTextChanged ( EventArgs e ) : void

Raises the ScaleTextChanged event.

OnScroll ( ScrollEventArgs e ) : void

Raises the Scroll event.

OnSelected ( EventArgs e ) : void

Raises the Selected event.

OnSelecting ( ImageBoxCancelEventArgs e ) : void

Raises the Selecting event.

OnSelectionColorChanged ( EventArgs e ) : void

Raises the SelectionColorChanged event.

OnSelectionModeChanged ( EventArgs e ) : void

Raises the SelectionModeChanged event.

OnSelectionRegionChanged ( EventArgs e ) : void

Raises the SelectionRegionChanged event.

OnShortcutsEnabledChanged ( EventArgs e ) : void

Raises the ShortcutsEnabledChanged event.

OnShowPixelGridChanged ( EventArgs e ) : void

Raises the ShowPixelGridChanged event.

OnSizeModeChanged ( EventArgs e ) : void

Raises the SizeModeChanged event.

OnSizeToFitChanged ( EventArgs e ) : void

Raises the SizeToFitChanged event.

OnTextAlignChanged ( EventArgs e ) : void

Raises the TextAlignChanged event.

OnTextBackColorChanged ( EventArgs e ) : void

Raises the TextBackColorChanged event.

OnTextChanged ( EventArgs e ) : void

Raises the E:System.Windows.Forms.Control.TextChanged event.

OnTextDisplayModeChanged ( EventArgs e ) : void

Raises the TextDisplayModeChanged event.

OnTextPaddingChanged ( EventArgs e ) : void

Raises the TextPaddingChanged event.

OnVerticalScrollBarStyleChanged ( EventArgs e ) : void

Raises the VerticalScrollBarStyleChanged event.

OnVirtualDraw ( PaintEventArgs e ) : void

Raises the VirtualDraw event.

OnVirtualModeChanged ( EventArgs e ) : void

Raises the VirtualModeChanged event.

OnVirtualSizeChanged ( EventArgs e ) : void

Raises the VirtualSizeChanged event.

OnZoomChanged ( EventArgs e ) : void

Raises the ZoomChanged event.

OnZoomLevelsChanged ( EventArgs e ) : void

Raises the ZoomLevelsChanged event.

OnZoomed ( ImageBoxZoomEventArgs e ) : void

Raises the Zoomed event.

ProcessImageShortcuts ( KeyEventArgs e ) : void

Processes shortcut keys for zooming and selection

ProcessMouseZoom ( bool isZoomIn, Point cursorPosition ) : void

Processes zooming with the mouse. Attempts to keep the pre-zoom image pixel under the mouse after the zoom has completed.

ProcessPanning ( MouseEventArgs e ) : void

Performs mouse based panning

ProcessScrollingShortcuts ( KeyEventArgs e ) : void

Processes shortcut keys for scrolling

ProcessSelection ( MouseEventArgs e ) : void

Performs mouse based region selection

RestoreSizeMode ( ) : void

Resets the SizeMode property whilsts retaining the original Zoom.

Scale ( int value ) : int

Scales the specified integer according to the current zoom factor.

StartDrag ( MouseEventArgs e ) : void

Initializes a selection or drag operation.

UpdateScrollPosition ( Point position ) : void

Updates the scroll position.

Private Methods

Method Description
Clamp ( int value, int min, int max ) : int

Clamps the specified value within the given range.

DefineViewSize ( ) : void

Defines the view sized based on the current image and if the control is operating in virtual mode or not

GetImageSize ( ) : Size

Gets the size of the image.

If an error occurs, for example due to the image being disposed, an empty size is returned

GetZoomLevel ( ImageBoxZoomActions action ) : int

Returns an appropriate zoom level based on the specified action, relative to the current zoom level.

InitializeGridTile ( ) : void

Initializes the grid tile.

OnFrameChangedHandler ( object sender, EventArgs eventArgs ) : void

Called when the animation frame changes.

PerformActualSize ( ImageBoxActionSources source ) : void

Resets the zoom to 100%.

PerformZoom ( ImageBoxZoomActions action, ImageBoxActionSources source, bool preservePosition ) : void

Performs a zoom action.

PerformZoom ( ImageBoxZoomActions action, ImageBoxActionSources source, bool preservePosition, Point relativePoint ) : void

Performs a zoom action.

PerformZoomIn ( ImageBoxActionSources source, bool preservePosition ) : void

Zooms into the image

PerformZoomOut ( ImageBoxActionSources source, bool preservePosition ) : void

Zooms out of the image

ScrollBarScrollHandler ( object sender, ScrollEventArgs e ) : void

Handles the Scroll event of the embedded horizontal and vertical scroll bar controls.

SetZoom ( int value, ImageBoxZoomActions actions, ImageBoxActionSources source ) : void

Updates the current zoom.

ShouldShowScrollbar ( ImageBoxScrollBarStyle style, bool visible ) : bool

Determines if a scroll bar should be displayed.

UpdateScrollbars ( ) : void

Updates all properties of the embedded scroll bar controls.

Method Details

ActualSize() public method

Resets the zoom to 100%.
public ActualSize ( ) : void
return void

AdjustLayout() protected method

Adjusts the layout.
protected AdjustLayout ( ) : void
return void

AdjustScroll() protected method

Adjusts the scroll.
protected AdjustScroll ( int x, int y ) : void
x int The x.
y int The y.
return void

AdjustSize() protected method

Adjusts the size.
protected AdjustSize ( ) : void
return void

AdjustViewPort() protected method

Adjusts the view port.
protected AdjustViewPort ( ) : void
return void

BeginUpdate() public method

Disables any redrawing of the image box
public BeginUpdate ( ) : void
return void

CenterAt() public method

Centers the given point in the image in the center of the control
public CenterAt ( Point imageLocation ) : void
imageLocation Point The point of the image to attempt to center.
return void

CenterAt() public method

Centers the given point in the image in the center of the control
public CenterAt ( float x, float y ) : void
x float The X co-ordinate of the point to center.
y float The Y co-ordinate of the point to center.
return void

CenterAt() public method

Centers the given point in the image in the center of the control
public CenterAt ( int x, int y ) : void
x int The X co-ordinate of the point to center.
y int The Y co-ordinate of the point to center.
return void

CenterToImage() public method

Resets the viewport to show the center of the image.
public CenterToImage ( ) : void
return void

CreateCheckerBoxTile() public static method

Creates a checked tile texture using default values.
public static CreateCheckerBoxTile ( ) : Bitmap
return System.Drawing.Bitmap

CreateCheckerBoxTile() public static method

Creates a bitmap image containing a 2x2 grid using the specified cell size and colors.
public static CreateCheckerBoxTile ( int cellSize, Color cellColor, Color alternateCellColor ) : Bitmap
cellSize int Size of the cell.
cellColor Color Cell color.
alternateCellColor Color Alternate cell color.
return System.Drawing.Bitmap

CreateGridTileImage() protected method

Creates the grid tile image.
protected CreateGridTileImage ( int cellSize, Color firstColor, Color secondColor ) : Bitmap
cellSize int Size of the cell.
firstColor Color The first color.
secondColor Color Color of the second.
return System.Drawing.Bitmap

Dispose() protected method

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
return void

DrawBackground() protected method

Draws the background of the control.
protected DrawBackground ( PaintEventArgs e ) : void
e PaintEventArgs The instance containing the event data.
return void

DrawDropShadow() protected method

Draws a drop shadow.
protected DrawDropShadow ( Graphics g, Rectangle viewPort ) : void
g System.Drawing.Graphics The graphics.
viewPort System.Drawing.Rectangle The view port.
return void

DrawGlowShadow() protected method

Draws a glow shadow.
protected DrawGlowShadow ( Graphics g, Rectangle viewPort ) : void
g System.Drawing.Graphics The graphics.
viewPort System.Drawing.Rectangle The view port.
return void

DrawImage() protected method

Draws the image.
protected DrawImage ( Graphics g ) : void
g System.Drawing.Graphics The g.
return void

DrawImageBorder() protected method

Draws a border around the image.
protected DrawImageBorder ( Graphics graphics ) : void
graphics System.Drawing.Graphics The graphics.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.
protected DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
foreColor Color The to apply to the text.
backColor Color The to apply to the area represented by bounds.
textAlign ContentAlignment The to apply to the text.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.
protected DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
foreColor Color The to apply to the text.
backColor Color The to apply to the area represented by bounds.
textAlign ContentAlignment The to apply to the text.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
scaleText bool If set to true the font size is scaled according to the current zoom level.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context, font, color, back color, and formatting instructions.
protected DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, ContentAlignment textAlign, Rectangle bounds, bool scaleText, Padding padding ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
foreColor Color The to apply to the text.
backColor Color The to apply to the area represented by bounds.
textAlign ContentAlignment The to apply to the text.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
scaleText bool If set to true the font size is scaled according to the current zoom level.
padding Padding Padding to apply around the text
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context, font, color, and back color.
protected DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Color backColor, Rectangle bounds ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
foreColor Color The to apply to the text.
backColor Color The to apply to the area represented by bounds.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context, font, and color.
protected DrawLabel ( Graphics graphics, string text, Font font, Color foreColor, Rectangle bounds ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
foreColor Color The to apply to the text.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context and font.
protected DrawLabel ( Graphics graphics, string text, Font font, Rectangle bounds ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
font System.Drawing.Font The to apply to the drawn text.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
return void

DrawLabel() protected method

Draws the specified text within the specified bounds using the specified device context.
protected DrawLabel ( Graphics graphics, string text, Rectangle bounds ) : void
graphics System.Drawing.Graphics The device context in which to draw the text.
text string The text to draw.
bounds System.Drawing.Rectangle The that represents the bounds of the text.
return void

DrawPixelGrid() protected method

Draws a pixel grid.
protected DrawPixelGrid ( Graphics g ) : void
g System.Drawing.Graphics The graphics to draw the grid to.
return void

DrawSelection() protected method

Draws the selection region.
protected DrawSelection ( PaintEventArgs e ) : void
e PaintEventArgs /// The instance containing the event data. ///
return void

DrawText() protected method

Draws the text.
protected DrawText ( PaintEventArgs e ) : void
e PaintEventArgs The instance containing the event data.
return void

EndDrag() protected method

Completes an ongoing selection or drag operation.
protected EndDrag ( ) : void
return void

EndUpdate() public method

Enables the redrawing of the image box
public EndUpdate ( ) : void
return void

FitRectangle() public method

Fits a given T:System.Drawing.Rectangle to match image boundaries
public FitRectangle ( Rectangle rectangle ) : Rectangle
rectangle System.Drawing.Rectangle The rectangle.
return System.Drawing.Rectangle

FitRectangle() public method

Fits a given T:System.Drawing.RectangleF to match image boundaries
public FitRectangle ( RectangleF rectangle ) : RectangleF
rectangle System.Drawing.RectangleF The rectangle.
return System.Drawing.RectangleF

GetImageBorderOffset() protected method

Gets an offset based on the current image border style.
protected GetImageBorderOffset ( ) : int
return int

GetImageViewPort() public method

Gets the image view port.
public GetImageViewPort ( ) : Rectangle
return System.Drawing.Rectangle

GetInsideViewPort() public method

Gets the inside view port, excluding any padding.
public GetInsideViewPort ( ) : Rectangle
return System.Drawing.Rectangle

GetInsideViewPort() public method

Gets the inside view port.
public GetInsideViewPort ( bool includePadding ) : Rectangle
includePadding bool /// if set to true [include padding]. ///
return System.Drawing.Rectangle

GetInterpolationMode() protected method

Determines a suitable interpolation mode based in the value of the InterpolationMode and Zoom properties.
protected GetInterpolationMode ( ) : InterpolationMode
return InterpolationMode

GetOffsetPoint() public method

Returns the source T:System.Drawing.Point repositioned to include the current image offset and scaled by the current zoom level
public GetOffsetPoint ( Point source ) : Point
source Point The source to offset.
return Point

GetOffsetPoint() public method

Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level
public GetOffsetPoint ( int x, int y ) : Point
x int The source X co-ordinate.
y int The source Y co-ordinate.
return Point

GetOffsetPoint() public method

Returns the source T:System.Drawing.PointF repositioned to include the current image offset and scaled by the current zoom level
public GetOffsetPoint ( PointF source ) : PointF
source System.Drawing.PointF The source to offset.
return System.Drawing.PointF

GetOffsetPoint() public method

Returns the source co-ordinates repositioned to include the current image offset and scaled by the current zoom level
public GetOffsetPoint ( float x, float y ) : PointF
x float The source X co-ordinate.
y float The source Y co-ordinate.
return System.Drawing.PointF

GetOffsetRectangle() public method

Returns the source T:System.Drawing.Rectangle scaled according to the current zoom level and repositioned to include the current image offset
public GetOffsetRectangle ( Rectangle source ) : Rectangle
source System.Drawing.Rectangle The source to offset.
return System.Drawing.Rectangle

GetOffsetRectangle() public method

Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset
public GetOffsetRectangle ( int x, int y, int width, int height ) : Rectangle
x int The X co-ordinate of the source rectangle.
y int The Y co-ordinate of the source rectangle.
width int The width of the rectangle.
height int The height of the rectangle.
return System.Drawing.Rectangle

GetOffsetRectangle() public method

Returns the source T:System.Drawing.RectangleF scaled according to the current zoom level and repositioned to include the current image offset
public GetOffsetRectangle ( RectangleF source ) : RectangleF
source System.Drawing.RectangleF The source to offset.
return System.Drawing.RectangleF

GetOffsetRectangle() public method

Returns the source rectangle scaled according to the current zoom level and repositioned to include the current image offset
public GetOffsetRectangle ( float x, float y, float width, float height ) : RectangleF
x float The X co-ordinate of the source rectangle.
y float The Y co-ordinate of the source rectangle.
width float The width of the rectangle.
height float The height of the rectangle.
return System.Drawing.RectangleF

GetPreferredSize() public method

Retrieves the size of a rectangular area into which a control can be fitted.
public GetPreferredSize ( Size proposedSize ) : Size
proposedSize System.Drawing.Size The custom-sized area for a control.
return System.Drawing.Size

GetScaledPoint() public method

Returns the source T:System.Drawing.Point scaled according to the current zoom level
public GetScaledPoint ( Point source ) : Point
source Point The source to scale.
return Point

GetScaledPoint() public method

Returns the source T:System.Drawing.Point scaled according to the current zoom level
public GetScaledPoint ( int x, int y ) : Point
x int The X co-ordinate of the point to scale.
y int The Y co-ordinate of the point to scale.
return Point

GetScaledPoint() public method

Returns the source T:System.Drawing.PointF scaled according to the current zoom level
public GetScaledPoint ( PointF source ) : PointF
source System.Drawing.PointF The source to scale.
return System.Drawing.PointF

GetScaledPoint() public method

Returns the source T:System.Drawing.Point scaled according to the current zoom level
public GetScaledPoint ( float x, float y ) : PointF
x float The X co-ordinate of the point to scale.
y float The Y co-ordinate of the point to scale.
return System.Drawing.PointF

GetScaledRectangle() public method

Returns the source rectangle scaled according to the current zoom level
public GetScaledRectangle ( Point location, Size size ) : Rectangle
location Point The location of the source rectangle.
size System.Drawing.Size The size of the source rectangle.
return System.Drawing.Rectangle

GetScaledRectangle() public method

Returns the source T:System.Drawing.Rectangle scaled according to the current zoom level
public GetScaledRectangle ( Rectangle source ) : Rectangle
source System.Drawing.Rectangle The source to scale.
return System.Drawing.Rectangle

GetScaledRectangle() public method

Returns the source rectangle scaled according to the current zoom level
public GetScaledRectangle ( int x, int y, int width, int height ) : Rectangle
x int The X co-ordinate of the source rectangle.
y int The Y co-ordinate of the source rectangle.
width int The width of the rectangle.
height int The height of the rectangle.
return System.Drawing.Rectangle

GetScaledRectangle() public method

Returns the source rectangle scaled according to the current zoom level
public GetScaledRectangle ( PointF location, SizeF size ) : RectangleF
location System.Drawing.PointF The location of the source rectangle.
size System.Drawing.SizeF The size of the source rectangle.
return System.Drawing.RectangleF

GetScaledRectangle() public method

Returns the source T:System.Drawing.RectangleF scaled according to the current zoom level
public GetScaledRectangle ( RectangleF source ) : RectangleF
source System.Drawing.RectangleF The source to scale.
return System.Drawing.RectangleF

GetScaledRectangle() public method

Returns the source rectangle scaled according to the current zoom level
public GetScaledRectangle ( float x, float y, float width, float height ) : RectangleF
x float The X co-ordinate of the source rectangle.
y float The Y co-ordinate of the source rectangle.
width float The width of the rectangle.
height float The height of the rectangle.
return System.Drawing.RectangleF

GetScaledSize() public method

Returns the source T:System.Drawing.Size scaled according to the current zoom level
public GetScaledSize ( Size source ) : Size
source System.Drawing.Size The source to scale.
return System.Drawing.Size

GetScaledSize() public method

Returns the source size scaled according to the current zoom level
public GetScaledSize ( int width, int height ) : Size
width int The width of the size to scale.
height int The height of the size to scale.
return System.Drawing.Size

GetScaledSize() public method

Returns the source T:System.Drawing.SizeF scaled according to the current zoom level
public GetScaledSize ( SizeF source ) : SizeF
source System.Drawing.SizeF The source to scale.
return System.Drawing.SizeF

GetScaledSize() public method

Returns the source size scaled according to the current zoom level
public GetScaledSize ( float width, float height ) : SizeF
width float The width of the size to scale.
height float The height of the size to scale.
return System.Drawing.SizeF

GetSelectedImage() public method

Creates an image based on the current selection region
The caller is responsible for disposing of the returned image
public GetSelectedImage ( ) : Image
return Image

GetSourceImageRegion() public method

Gets the source image region.
public GetSourceImageRegion ( ) : RectangleF
return System.Drawing.RectangleF

ImageBox() public method

Initializes a new instance of the ImageBox class.
public ImageBox ( ) : System
return System

IsInputKey() protected method

Determines whether the specified key is a regular input key or a special key that requires preprocessing.
protected IsInputKey ( Keys keyData ) : bool
keyData Keys /// One of the values. ///
return bool

IsPointInImage() public method

Determines whether the specified point is located within the image view port
public IsPointInImage ( Point point ) : bool
point Point The point.
return bool

IsPointInImage() public method

Determines whether the specified point is located within the image view port
public IsPointInImage ( float x, float y ) : bool
x float The X co-ordinate of the point to check.
y float The Y co-ordinate of the point to check.
return bool

IsPointInImage() public method

Determines whether the specified point is located within the image view port
public IsPointInImage ( int x, int y ) : bool
x int The X co-ordinate of the point to check.
y int The Y co-ordinate of the point to check.
return bool

OnAllowClickZoomChanged() protected method

Raises the AllowClickZoomChanged event.
protected OnAllowClickZoomChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnAllowDoubleClickChanged() protected method

Raises the AllowDoubleClickChanged event.
protected OnAllowDoubleClickChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnAllowUnfocusedMouseWheelChanged() protected method

Raises the AllowUnfocusedMouseWheelChanged event.
protected OnAllowUnfocusedMouseWheelChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnAllowZoomChanged() protected method

Raises the AllowZoomChanged event.
protected OnAllowZoomChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnAutoCenterChanged() protected method

Raises the AutoCenterChanged event.
protected OnAutoCenterChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnAutoPanChanged() protected method

Raises the AutoPanChanged event.
protected OnAutoPanChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnBackColorChanged() protected method

Raises the System.Windows.Forms.Control.BackColorChanged event.
protected OnBackColorChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnBorderStyleChanged() protected method

Raises the BorderStyleChanged event.
protected OnBorderStyleChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnDockChanged() protected method

Raises the System.Windows.Forms.Control.DockChanged event.
protected OnDockChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnDropShadowSizeChanged() protected method

Raises the DropShadowSizeChanged event.
protected OnDropShadowSizeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnFontChanged() protected method

Raises the E:System.Windows.Forms.Control.FontChanged event.
protected OnFontChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
return void

OnForeColorChanged() protected method

Raises the E:System.Windows.Forms.Control.ForeColorChanged event.
protected OnForeColorChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
return void

OnGridCellSizeChanged() protected method

Raises the GridCellSizeChanged event.
protected OnGridCellSizeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnGridColorAlternateChanged() protected method

Raises the GridColorAlternateChanged event.
protected OnGridColorAlternateChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnGridColorChanged() protected method

Raises the GridColorChanged event.
protected OnGridColorChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnGridDisplayModeChanged() protected method

Raises the GridDisplayModeChanged event.
protected OnGridDisplayModeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnGridScaleChanged() protected method

Raises the GridScaleChanged event.
protected OnGridScaleChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnHorizontalScrollBarStyleChanged() protected method

Raises the HorizontalScrollBarStyleChanged event.
protected OnHorizontalScrollBarStyleChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnImageBorderColorChanged() protected method

Raises the ImageBorderColorChanged event.
protected OnImageBorderColorChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnImageBorderStyleChanged() protected method

Raises the ImageBorderStyleChanged event.
protected OnImageBorderStyleChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnImageChanged() protected method

Raises the ImageChanged event.
protected OnImageChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnInterpolationModeChanged() protected method

Raises the InterpolationModeChanged event.
protected OnInterpolationModeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnInvertMouseChanged() protected method

Raises the InvertMouseChanged event.
protected OnInvertMouseChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnKeyDown() protected method

Raises the System.Windows.Forms.Control.KeyDown event.
protected OnKeyDown ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs /// A that contains the event data. ///
return void

OnLimitSelectionToImageChanged() protected method

Raises the LimitSelectionToImageChanged event.
protected OnLimitSelectionToImageChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnMouseDown() protected method

Raises the System.Windows.Forms.Control.MouseDown event.
protected OnMouseDown ( MouseEventArgs e ) : void
e MouseEventArgs /// A that contains the event data. ///
return void

OnMouseMove() protected method

Raises the System.Windows.Forms.Control.MouseMove event.
protected OnMouseMove ( MouseEventArgs e ) : void
e MouseEventArgs /// A that contains the event data. ///
return void

OnMouseUp() protected method

Raises the System.Windows.Forms.Control.MouseUp event.
protected OnMouseUp ( MouseEventArgs e ) : void
e MouseEventArgs /// A that contains the event data. ///
return void

OnMouseWheel() protected method

Raises the System.Windows.Forms.Control.MouseWheel event.
protected OnMouseWheel ( MouseEventArgs e ) : void
e MouseEventArgs /// A that contains the event data. ///
return void

OnPaddingChanged() protected method

Raises the System.Windows.Forms.Control.PaddingChanged event.
protected OnPaddingChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnPaint() protected method

Raises the System.Windows.Forms.Control.Paint event.
protected OnPaint ( PaintEventArgs e ) : void
e PaintEventArgs /// A that contains the event data. ///
return void

OnPanEnd() protected method

Raises the PanEnd event.
protected OnPanEnd ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnPanStart() protected method

Raises the PanStart event.
protected OnPanStart ( CancelEventArgs e ) : void
e CancelEventArgs /// The instance containing the event data. ///
return void

OnParentChanged() protected method

Raises the System.Windows.Forms.Control.ParentChanged event.
protected OnParentChanged ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnPixelGridColorChanged() protected method

Raises the PixelGridColorChanged event.
protected OnPixelGridColorChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnPixelGridThresholdChanged() protected method

Raises the PixelGridThresholdChanged event.
protected OnPixelGridThresholdChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnResize() protected method

Raises the System.Windows.Forms.Control.Resize event.
protected OnResize ( EventArgs e ) : void
e System.EventArgs /// An that contains the event data. ///
return void

OnScaleTextChanged() protected method

Raises the ScaleTextChanged event.
protected OnScaleTextChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnScroll() protected method

Raises the Scroll event.
protected OnScroll ( ScrollEventArgs e ) : void
e System.Windows.Forms.ScrollEventArgs /// The instance containing the event data. ///
return void

OnSelected() protected method

Raises the Selected event.
protected OnSelected ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnSelecting() protected method

Raises the Selecting event.
protected OnSelecting ( ImageBoxCancelEventArgs e ) : void
e ImageBoxCancelEventArgs /// The instance containing the event data. ///
return void

OnSelectionColorChanged() protected method

Raises the SelectionColorChanged event.
protected OnSelectionColorChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnSelectionModeChanged() protected method

Raises the SelectionModeChanged event.
protected OnSelectionModeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnSelectionRegionChanged() protected method

Raises the SelectionRegionChanged event.
protected OnSelectionRegionChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnShortcutsEnabledChanged() protected method

Raises the ShortcutsEnabledChanged event.
protected OnShortcutsEnabledChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnShowPixelGridChanged() protected method

Raises the ShowPixelGridChanged event.
protected OnShowPixelGridChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnSizeModeChanged() protected method

Raises the SizeModeChanged event.
protected OnSizeModeChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnSizeToFitChanged() protected method

Raises the SizeToFitChanged event.
protected OnSizeToFitChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnTextAlignChanged() protected method

Raises the TextAlignChanged event.
protected OnTextAlignChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnTextBackColorChanged() protected method

Raises the TextBackColorChanged event.
protected OnTextBackColorChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnTextChanged() protected method

Raises the E:System.Windows.Forms.Control.TextChanged event.
protected OnTextChanged ( EventArgs e ) : void
e System.EventArgs An that contains the event data.
return void

OnTextDisplayModeChanged() protected method

Raises the TextDisplayModeChanged event.
protected OnTextDisplayModeChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnTextPaddingChanged() protected method

Raises the TextPaddingChanged event.
protected OnTextPaddingChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnVerticalScrollBarStyleChanged() protected method

Raises the VerticalScrollBarStyleChanged event.
protected OnVerticalScrollBarStyleChanged ( EventArgs e ) : void
e System.EventArgs The instance containing the event data.
return void

OnVirtualDraw() protected method

Raises the VirtualDraw event.
protected OnVirtualDraw ( PaintEventArgs e ) : void
e PaintEventArgs /// The instance containing the event data. ///
return void

OnVirtualModeChanged() protected method

Raises the VirtualModeChanged event.
protected OnVirtualModeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnVirtualSizeChanged() protected method

Raises the VirtualSizeChanged event.
protected OnVirtualSizeChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnZoomChanged() protected method

Raises the ZoomChanged event.
protected OnZoomChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnZoomLevelsChanged() protected method

Raises the ZoomLevelsChanged event.
protected OnZoomLevelsChanged ( EventArgs e ) : void
e System.EventArgs /// The instance containing the event data. ///
return void

OnZoomed() protected method

Raises the Zoomed event.
protected OnZoomed ( ImageBoxZoomEventArgs e ) : void
e ImageBoxZoomEventArgs The instance containing the event data.
return void

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( Point point ) : Point
point Point The source point.
return Point

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( Point point, bool fitToBounds ) : Point
point Point The source point.
fitToBounds bool /// if set to true and the point is outside the bounds of the source image, it will be mapped to the nearest edge. ///
return Point

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( float x, float y ) : Point
x float The X co-ordinate of the point to convert.
y float The Y co-ordinate of the point to convert.
return Point

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( float x, float y, bool fitToBounds ) : Point
x float The X co-ordinate of the point to convert.
y float The Y co-ordinate of the point to convert.
fitToBounds bool /// if set to true and the point is outside the bounds of the source image, it will be mapped to the nearest edge. ///
return Point

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( int x, int y ) : Point
x int The X co-ordinate of the point to convert.
y int The Y co-ordinate of the point to convert.
return Point

PointToImage() public method

Converts the given client size point to represent a coordinate on the source image.
public PointToImage ( int x, int y, bool fitToBounds ) : Point
x int The X co-ordinate of the point to convert.
y int The Y co-ordinate of the point to convert.
fitToBounds bool /// if set to true and the point is outside the bounds of the source image, it will be mapped to the nearest edge. ///
return Point

ProcessImageShortcuts() protected method

Processes shortcut keys for zooming and selection
protected ProcessImageShortcuts ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs /// The instance containing the event data. ///
return void

ProcessMouseZoom() protected method

Processes zooming with the mouse. Attempts to keep the pre-zoom image pixel under the mouse after the zoom has completed.
protected ProcessMouseZoom ( bool isZoomIn, Point cursorPosition ) : void
isZoomIn bool /// if set to true zoom in, otherwise zoom out. ///
cursorPosition Point The cursor position.
return void

ProcessPanning() protected method

Performs mouse based panning
protected ProcessPanning ( MouseEventArgs e ) : void
e MouseEventArgs /// The instance containing the event data. ///
return void

ProcessScrollingShortcuts() protected method

Processes shortcut keys for scrolling
protected ProcessScrollingShortcuts ( KeyEventArgs e ) : void
e System.Windows.Forms.KeyEventArgs /// The instance containing the event data. ///
return void

ProcessSelection() protected method

Performs mouse based region selection
protected ProcessSelection ( MouseEventArgs e ) : void
e MouseEventArgs /// The instance containing the event data. ///
return void

RestoreSizeMode() protected method

Resets the SizeMode property whilsts retaining the original Zoom.
protected RestoreSizeMode ( ) : void
return void

Scale() protected method

Scales the specified integer according to the current zoom factor.
protected Scale ( int value ) : int
value int The value to scale.
return int

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

ScrollTo() public method

Scrolls the control to the given point in the image, offset at the specified display point
public ScrollTo ( float x, float y, float relativeX, float relativeY ) : void
x float The X co-ordinate of the point to scroll to.
y float The Y co-ordinate of the point to scroll to.
relativeX float The X co-ordinate relative to the x parameter.
relativeY float The Y co-ordinate relative to the y parameter.
return void

ScrollTo() public method

Scrolls the control to the given point in the image, offset at the specified display point
public ScrollTo ( int x, int y, int relativeX, int relativeY ) : void
x int The X co-ordinate of the point to scroll to.
y int The Y co-ordinate of the point to scroll to.
relativeX int The X co-ordinate relative to the x parameter.
relativeY int The Y co-ordinate relative to the y parameter.
return void

SelectAll() public method

Creates a selection region which encompasses the entire image
Thrown if no image is currently set
public SelectAll ( ) : void
return void

SelectNone() public method

Clears any existing selection region
public SelectNone ( ) : void
return void

StartAnimating() public method

Stop animating
public StartAnimating ( ) : void
return void

StartDrag() protected method

Initializes a selection or drag operation.
protected StartDrag ( MouseEventArgs e ) : void
e MouseEventArgs The instance containing the event data.
return void

StopAnimating() public method

Start animating
public StopAnimating ( ) : void
return void

UpdateScrollPosition() protected method

Updates the scroll position.
protected UpdateScrollPosition ( Point position ) : void
position Point The position.
return void

ZoomAuto() public method

[PHAP] Zooms to the maximum size for displaying the entire image within the bounds of the control. If image size is smaller than viewer size, keep its original size.
public ZoomAuto ( ) : void
return void

ZoomIn() public method

Zooms into the image
public ZoomIn ( ) : void
return void

ZoomIn() public method

Zooms into the image
public ZoomIn ( bool preservePosition ) : void
preservePosition bool true if the current scrolling position should be preserved relative to the new zoom level, false to reset.
return void

ZoomOut() public method

Zooms out of the image
public ZoomOut ( ) : void
return void

ZoomOut() public method

Zooms out of the image
public ZoomOut ( bool preservePosition ) : void
preservePosition bool true if the current scrolling position should be preserved relative to the new zoom level, false to reset.
return void

ZoomToFit() public method

Zooms to the maximum size for displaying the entire image within the bounds of the control.
public ZoomToFit ( ) : void
return void

ZoomToRegion() public method

Adjusts the view port to fit the given region
public ZoomToRegion ( RectangleF rectangle ) : void
rectangle System.Drawing.RectangleF The rectangle to fit the view port to.
return void

ZoomToRegion() public method

Adjusts the view port to fit the given region
public ZoomToRegion ( float x, float y, float width, float height ) : void
x float The X co-ordinate of the selection region.
y float The Y co-ordinate of the selection region.
width float The width of the selection region.
height float The height of the selection region.
return void

ZoomToRegion() public method

Adjusts the view port to fit the given region
public ZoomToRegion ( int x, int y, int width, int height ) : void
x int The X co-ordinate of the selection region.
y int The Y co-ordinate of the selection region.
width int The width of the selection region.
height int The height of the selection region.
return void