C# Class ImageGlass.ImageBox

Inheritance: System.Windows.Forms.Control
Afficher le fichier Open project: d2phap/ImageGlass

Private Properties

Свойство 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

Méthodes publiques

Méthode 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

Méthodes protégées

Méthode 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

Méthode 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 méthode

Resets the zoom to 100%.
public ActualSize ( ) : void
Résultat void

AdjustLayout() protected méthode

Adjusts the layout.
protected AdjustLayout ( ) : void
Résultat void

AdjustScroll() protected méthode

Adjusts the scroll.
protected AdjustScroll ( int x, int y ) : void
x int The x.
y int The y.
Résultat void

AdjustSize() protected méthode

Adjusts the size.
protected AdjustSize ( ) : void
Résultat void

AdjustViewPort() protected méthode

Adjusts the view port.
protected AdjustViewPort ( ) : void
Résultat void

BeginUpdate() public méthode

Disables any redrawing of the image box
public BeginUpdate ( ) : void
Résultat void

CenterAt() public méthode

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.
Résultat void

CenterAt() public méthode

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.
Résultat void

CenterAt() public méthode

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.
Résultat void

CenterToImage() public méthode

Resets the viewport to show the center of the image.
public CenterToImage ( ) : void
Résultat void

CreateCheckerBoxTile() public static méthode

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

CreateCheckerBoxTile() public static méthode

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.
Résultat System.Drawing.Bitmap

CreateGridTileImage() protected méthode

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.
Résultat System.Drawing.Bitmap

Dispose() protected méthode

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

DrawBackground() protected méthode

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

DrawDropShadow() protected méthode

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

DrawGlowShadow() protected méthode

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

DrawImage() protected méthode

Draws the image.
protected DrawImage ( Graphics g ) : void
g System.Drawing.Graphics The g.
Résultat void

DrawImageBorder() protected méthode

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

DrawLabel() protected méthode

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.
Résultat void

DrawLabel() protected méthode

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.
Résultat void

DrawLabel() protected méthode

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
Résultat void

DrawLabel() protected méthode

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.
Résultat void

DrawLabel() protected méthode

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.
Résultat void

DrawLabel() protected méthode

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.
Résultat void

DrawLabel() protected méthode

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.
Résultat void

DrawPixelGrid() protected méthode

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

DrawSelection() protected méthode

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

DrawText() protected méthode

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

EndDrag() protected méthode

Completes an ongoing selection or drag operation.
protected EndDrag ( ) : void
Résultat void

EndUpdate() public méthode

Enables the redrawing of the image box
public EndUpdate ( ) : void
Résultat void

FitRectangle() public méthode

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

FitRectangle() public méthode

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

GetImageBorderOffset() protected méthode

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

GetImageViewPort() public méthode

Gets the image view port.
public GetImageViewPort ( ) : Rectangle
Résultat System.Drawing.Rectangle

GetInsideViewPort() public méthode

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

GetInsideViewPort() public méthode

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

GetInterpolationMode() protected méthode

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

GetOffsetPoint() public méthode

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.
Résultat Point

GetOffsetPoint() public méthode

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.
Résultat Point

GetOffsetPoint() public méthode

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.
Résultat System.Drawing.PointF

GetOffsetPoint() public méthode

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.
Résultat System.Drawing.PointF

GetOffsetRectangle() public méthode

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.
Résultat System.Drawing.Rectangle

GetOffsetRectangle() public méthode

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.
Résultat System.Drawing.Rectangle

GetOffsetRectangle() public méthode

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.
Résultat System.Drawing.RectangleF

GetOffsetRectangle() public méthode

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.
Résultat System.Drawing.RectangleF

GetPreferredSize() public méthode

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.
Résultat System.Drawing.Size

GetScaledPoint() public méthode

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.
Résultat Point

GetScaledPoint() public méthode

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.
Résultat Point

GetScaledPoint() public méthode

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.
Résultat System.Drawing.PointF

GetScaledPoint() public méthode

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.
Résultat System.Drawing.PointF

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.Rectangle

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.Rectangle

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.Rectangle

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.RectangleF

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.RectangleF

GetScaledRectangle() public méthode

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.
Résultat System.Drawing.RectangleF

GetScaledSize() public méthode

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.
Résultat System.Drawing.Size

GetScaledSize() public méthode

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.
Résultat System.Drawing.Size

GetScaledSize() public méthode

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.
Résultat System.Drawing.SizeF

GetScaledSize() public méthode

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.
Résultat System.Drawing.SizeF

GetSelectedImage() public méthode

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

GetSourceImageRegion() public méthode

Gets the source image region.
public GetSourceImageRegion ( ) : RectangleF
Résultat System.Drawing.RectangleF

ImageBox() public méthode

Initializes a new instance of the ImageBox class.
public ImageBox ( ) : System
Résultat System

IsInputKey() protected méthode

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. ///
Résultat bool

IsPointInImage() public méthode

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

IsPointInImage() public méthode

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.
Résultat bool

IsPointInImage() public méthode

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.
Résultat bool

OnAllowClickZoomChanged() protected méthode

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

OnAllowDoubleClickChanged() protected méthode

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

OnAllowUnfocusedMouseWheelChanged() protected méthode

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

OnAllowZoomChanged() protected méthode

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

OnAutoCenterChanged() protected méthode

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

OnAutoPanChanged() protected méthode

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

OnBackColorChanged() protected méthode

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

OnBorderStyleChanged() protected méthode

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

OnDockChanged() protected méthode

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

OnDropShadowSizeChanged() protected méthode

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

OnFontChanged() protected méthode

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

OnForeColorChanged() protected méthode

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

OnGridCellSizeChanged() protected méthode

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

OnGridColorAlternateChanged() protected méthode

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

OnGridColorChanged() protected méthode

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

OnGridDisplayModeChanged() protected méthode

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

OnGridScaleChanged() protected méthode

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

OnHorizontalScrollBarStyleChanged() protected méthode

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

OnImageBorderColorChanged() protected méthode

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

OnImageBorderStyleChanged() protected méthode

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

OnImageChanged() protected méthode

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

OnInterpolationModeChanged() protected méthode

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

OnInvertMouseChanged() protected méthode

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

OnKeyDown() protected méthode

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

OnLimitSelectionToImageChanged() protected méthode

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

OnMouseDown() protected méthode

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

OnMouseMove() protected méthode

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

OnMouseUp() protected méthode

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

OnMouseWheel() protected méthode

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

OnPaddingChanged() protected méthode

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

OnPaint() protected méthode

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

OnPanEnd() protected méthode

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

OnPanStart() protected méthode

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

OnParentChanged() protected méthode

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

OnPixelGridColorChanged() protected méthode

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

OnPixelGridThresholdChanged() protected méthode

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

OnResize() protected méthode

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

OnScaleTextChanged() protected méthode

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

OnScroll() protected méthode

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

OnSelected() protected méthode

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

OnSelecting() protected méthode

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

OnSelectionColorChanged() protected méthode

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

OnSelectionModeChanged() protected méthode

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

OnSelectionRegionChanged() protected méthode

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

OnShortcutsEnabledChanged() protected méthode

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

OnShowPixelGridChanged() protected méthode

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

OnSizeModeChanged() protected méthode

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

OnSizeToFitChanged() protected méthode

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

OnTextAlignChanged() protected méthode

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

OnTextBackColorChanged() protected méthode

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

OnTextChanged() protected méthode

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

OnTextDisplayModeChanged() protected méthode

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

OnTextPaddingChanged() protected méthode

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

OnVerticalScrollBarStyleChanged() protected méthode

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

OnVirtualDraw() protected méthode

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

OnVirtualModeChanged() protected méthode

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

OnVirtualSizeChanged() protected méthode

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

OnZoomChanged() protected méthode

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

OnZoomLevelsChanged() protected méthode

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

OnZoomed() protected méthode

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

PointToImage() public méthode

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

PointToImage() public méthode

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. ///
Résultat Point

PointToImage() public méthode

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.
Résultat Point

PointToImage() public méthode

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. ///
Résultat Point

PointToImage() public méthode

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.
Résultat Point

PointToImage() public méthode

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. ///
Résultat Point

ProcessImageShortcuts() protected méthode

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

ProcessMouseZoom() protected méthode

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.
Résultat void

ProcessPanning() protected méthode

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

ProcessScrollingShortcuts() protected méthode

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

ProcessSelection() protected méthode

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

RestoreSizeMode() protected méthode

Resets the SizeMode property whilsts retaining the original Zoom.
protected RestoreSizeMode ( ) : void
Résultat void

Scale() protected méthode

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

ScrollTo() public méthode

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.
Résultat void

ScrollTo() public méthode

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.
Résultat void

ScrollTo() public méthode

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.
Résultat void

SelectAll() public méthode

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

SelectNone() public méthode

Clears any existing selection region
public SelectNone ( ) : void
Résultat void

StartAnimating() public méthode

Stop animating
public StartAnimating ( ) : void
Résultat void

StartDrag() protected méthode

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

StopAnimating() public méthode

Start animating
public StopAnimating ( ) : void
Résultat void

UpdateScrollPosition() protected méthode

Updates the scroll position.
protected UpdateScrollPosition ( Point position ) : void
position Point The position.
Résultat void

ZoomAuto() public méthode

[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
Résultat void

ZoomIn() public méthode

Zooms into the image
public ZoomIn ( ) : void
Résultat void

ZoomIn() public méthode

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.
Résultat void

ZoomOut() public méthode

Zooms out of the image
public ZoomOut ( ) : void
Résultat void

ZoomOut() public méthode

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.
Résultat void

ZoomToFit() public méthode

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

ZoomToRegion() public méthode

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.
Résultat void

ZoomToRegion() public méthode

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.
Résultat void

ZoomToRegion() public méthode

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.
Résultat void