Click or drag to resize

RectangleRubberband Class

A rectangular rubber-band that can be positioned with the mouse on a viewport control.
Inheritance Hierarchy
SystemObject
  SystemMarshalByRefObject
    System.ComponentModelComponent
      Atalasoft.Imaging.WinControlsRubberband
        Atalasoft.Imaging.WinControlsRectangleRubberband

Namespace:  Atalasoft.Imaging.WinControls
Assembly:  Atalasoft.dotImage.WinControls (in Atalasoft.dotImage.WinControls.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
public class RectangleRubberband : Rubberband

The RectangleRubberband type exposes the following members.

Constructors
  NameDescription
Public methodRectangleRubberband
Initializes a new instance of RectangleRubberband.
Public methodRectangleRubberband(Viewport)
Initializes a new instance of RectangleRubberband specifying the parent Viewport.
Top
Properties
  NameDescription
Public propertyActive
Gets or sets a value indicating if the rubberband is active in the parent Viewport control.
(Inherited from Rubberband.)
Public propertyActiveButtons
Gets or sets a value indicating which mouse buttons are used to draw the rubberband.
(Inherited from Rubberband.)
Public propertyAspectRatio
Gets or sets the aspect ratio which the rubberband will be constrained to.
(Inherited from Rubberband.)
Public propertyBackgroundColor
Gets or sets the background color of a dashed line.
(Inherited from Rubberband.)
Public propertyBounds
Gets or sets the rectangular area occupied by the rubberband in image pixel coordinates.
(Inherited from Rubberband.)
Protected propertyCanRaiseEvents
Gets a value indicating whether the component can raise an event.
(Inherited from Component.)
Public propertyClickLock
Gets or sets a value indicating if clicking on the Viewport without moving the mouse starts or finishes a rubberband.
(Inherited from Rubberband.)
Public propertyConstrainPosition
Gets or sets a value indicating if the RubberBand can be drawn outside the image area.
(Inherited from Rubberband.)
Public propertyContainer
Gets the IContainer that contains the Component.
(Inherited from Component.)
Public propertyCornerRadius
Gets or sets the rounding radius of each corner in pixels.
Public propertyCursor
Gets or sets the cursor which is displayed in the parent Viewport when active.
(Inherited from Rubberband.)
Protected propertyCursorPad
Gets or sets the amount of padding for the cursor to change and to allow adjusting the existing selection.
(Inherited from Rubberband.)
Protected propertyDesignMode
Gets a value that indicates whether the Component is currently in design mode.
(Inherited from Component.)
Protected propertyEndPoint
Gets or sets the end point of the Rubberband. Normally this is the bottom-right corner.
(Inherited from Rubberband.)
Protected propertyEvents
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public propertyFill
Gets or sets a Fill that is used to fill the inside of the rectangle.
Public propertyInverted
Gets or sets a value indicating if the rubberband is drawn inverted.
(Inherited from Rubberband.)
Protected propertyIsDragging
Gets or sets a value indicating whether the Rubberband is being dragged.
(Inherited from Rubberband.)
Public propertyMoveCursor

Gets or sets the cursor used when moving the rubberband.

(Inherited from Rubberband.)
Public propertyMoveWhenInside
Gets or sets a value indicating if the rubberband can be moved with the mouse.
(Inherited from Rubberband.)
Public propertyParent
Gets or sets the parent ViewPort control.
(Inherited from Rubberband.)
Public propertyPen
Gets or sets a value of the pen which is used to draw the rubberband.
(Inherited from Rubberband.)
Public propertyPersist
Gets or sets a value indicating if the rubberband continues to display after the mouse button is released.
(Inherited from Rubberband.)
Public propertySite
Gets or sets the ISite of the Component.
(Inherited from Component.)
Public propertySnapToPixelGrid
Gets or sets a value indicating if the rubberband snaps to a grid occupied by one image pixel.
(Inherited from Rubberband.)
Protected propertyStartPoint
Gets or sets the starting point of the Rubberband. Normally this is the top-left corner.
(Inherited from Rubberband.)
Public propertyVisible
Gets or sets a value indicating if the rubberband is currently visible.
(Inherited from Rubberband.)
Top
Methods
  NameDescription
Public methodCancel
Cancels dragging a new rubberband.
(Inherited from Rubberband.)
Public methodCreateObjRef
Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object.
(Inherited from MarshalByRefObject.)
Public methodDispose
Releases all resources used by the Component.
(Inherited from Component.)
Protected methodDispose(Boolean)
Releases resources held by the object back to the system.
(Inherited from Rubberband.)
Protected methodDrawRegion
Called when a region needs to be drawn.
(Inherited from Rubberband.)
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodEraseRegion
Call this method to erase the current region.
(Inherited from Rubberband.)
Protected methodFinalize (Inherited from Rubberband.)
Protected methodGetConstrainedPoint
Returns a point that is within the image bounds and snap to the pixel grid.
(Inherited from Rubberband.)
Public methodGetDisplayBounds
Returns a Rectangle representing the rectangular rubberband boundary in Viewport display coordinates.
(Inherited from Rubberband.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetLifetimeService
Retrieves the current lifetime service object that controls the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Public methodGetRegion
Returns the rectangular region occupied by this rubberband.
(Overrides RubberbandGetRegion.)
Protected methodGetService
Returns an object that represents a service provided by the Component or by its Container.
(Inherited from Component.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodHitTest
Returns a value indicating if the position is within the RubberBand boundary.
(Inherited from Rubberband.)
Public methodInitializeLifetimeService
Obtains a lifetime service object to control the lifetime policy for this instance.
(Inherited from MarshalByRefObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodMemberwiseClone(Boolean)
Creates a shallow copy of the current MarshalByRefObject object.
(Inherited from MarshalByRefObject.)
Protected methodOnActiveButtonsChanged
Called when the ActiveButtons property changes and raises the ActiveButtonsChanged event.
(Inherited from Rubberband.)
Protected methodOnActiveChanged
Called when the Active property has changed and raises the ActiveChanged event.
(Inherited from Rubberband.)
Protected methodOnAspectRatioChanged
Called when the AspectRatio property has changed and raises the AspectRatioChanged event.
(Inherited from Rubberband.)
Protected methodOnBackgroundColorChanged
Called when the BackgroundColor property has changed and raises the BackgroundColorChanged event.
(Inherited from Rubberband.)
Protected methodOnChanged
Called when the Rubberband has changed.
(Inherited from Rubberband.)
Protected methodOnChanging
Called when the Rubberband is in the process of changing.
(Inherited from Rubberband.)
Protected methodOnClickLockChanged
Called when the ClickLock property has changed and raises the ClickLockChanged event.
(Inherited from Rubberband.)
Protected methodOnConstrainPositionChanged
Called when the ConstrainPosition property has changed and raises the ConstrainPositionChanged event.
(Inherited from Rubberband.)
Protected methodOnCursorChanged
Called when the Cursor property has changed and raises the CursorChanged event.
(Inherited from Rubberband.)
Protected methodOnDrawRubberband (Overrides RubberbandOnDrawRubberband(Canvas, AtalaPen).)
Protected methodOnInvertedChanged
Called when the Inverted property has changed and raises the InvertedChanged event.
(Inherited from Rubberband.)
Protected methodOnMouseDown
Called when a mouse button is pressed over the Rubberband.
(Inherited from Rubberband.)
Protected methodOnMouseMove
Called when the mouse is moved over the Rubberband.
(Inherited from Rubberband.)
Protected methodOnMouseUp
Called when a mouse button is released over the Rubberband.
(Inherited from Rubberband.)
Protected methodOnMoveCursorChanged
Called when the MoveCursor property has changed and raises the MoveCursorChanged event.
(Inherited from Rubberband.)
Protected methodOnMoveWhenInsideChanged
Called when the MoveWhenInside property has changed and raises the MoveWhenInsideChanged event.
(Inherited from Rubberband.)
Protected methodOnPaint
Called when the Rubberband needs to be painted.
(Inherited from Rubberband.)
Protected methodOnParentChanged
Called when the Parent property has changed and raises the ParentChanged event.
(Inherited from Rubberband.)
Protected methodOnPenChanged
Called when the Pen property has changed and raises the PenChanged event.
(Inherited from Rubberband.)
Protected methodOnPersistChanged
Called when the Persist property has changed and raises the PersistChanged event.
(Inherited from Rubberband.)
Protected methodOnSnapToPixelGridChanged
Called when the SnapToPixelGrid property has changed and raises the SnapToPixelGridChanged event.
(Inherited from Rubberband.)
Protected methodOnVisibleChanged
Called when the Visible property has changed and raises the VisibleChanged event.
(Inherited from Rubberband.)
Protected methodPixelPointFromDisplayPoint
Returns the pixel position from the specified display position.
(Inherited from Rubberband.)
Protected methodPixelPointToDisplayPoint
Returns the display position from a pixel position.
(Inherited from Rubberband.)
Public methodSetDisplayBounds
Sets the rectangular boundary of the rubberband by using Viewport coordinates.
(Inherited from Rubberband.)
Public methodStart
Programmatically starts a new rubberband without user interaction.
(Inherited from Rubberband.)
Public methodToString
Returns a String containing the name of the Component, if any. This method should not be overridden.
(Inherited from Component.)
Top
Events
  NameDescription
Public eventActiveButtonsChanged
Occurs when ActiveButtons changes.
(Inherited from Rubberband.)
Public eventActiveChanged
Occurs when Active changes.
(Inherited from Rubberband.)
Public eventAspectRatioChanged
Occurs when AspectRatio changes.
(Inherited from Rubberband.)
Public eventBackgroundColorChanged
Occurs when BackgroundColor changes.
(Inherited from Rubberband.)
Public eventChanged
Occurs when the rubber band changes size (occurs on the MouseUp Event).
(Inherited from Rubberband.)
Public eventChanging
Occurs when the rubber band is changing size (occurs on the MouseMove Event).
(Inherited from Rubberband.)
Public eventClickLockChanged
Occurs when ClickLock changes.
(Inherited from Rubberband.)
Public eventConstrainPositionChanged
Occurs when ConstrainPosition changes.
(Inherited from Rubberband.)
Public eventCursorChanged
Occurs when %Cursor% changes.
(Inherited from Rubberband.)
Public eventDisposed
Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component.)
Public eventInvertedChanged
Occurs when Inverted changes.
(Inherited from Rubberband.)
Public eventMoveCursorChanged
Occurs when %MoveCursor% changes.
(Inherited from Rubberband.)
Public eventMoveWhenInsideChanged
Occurs when MoveWhenInside changes.
(Inherited from Rubberband.)
Public eventParentChanged
Occurs when %Parent% changes.
(Inherited from Rubberband.)
Public eventPenChanged
Occurs when Pen changes.
(Inherited from Rubberband.)
Public eventPersistChanged
Occurs when Persist changes.
(Inherited from Rubberband.)
Public eventSnapToPixelGridChanged
Occurs when SnapToPixelGrid changes.
(Inherited from Rubberband.)
Public eventVisibleChanged
Occurs when Visible changes.
(Inherited from Rubberband.)
Top
Remarks

This object is used to select a rectangular region in an image for cropping, zooming, and applying a command on a rectangular region as well as drawing rectangles onto an image.

Can be used as a component in the toolbox or instantiated directly.

See RectangleSelection for an object deriving from RectangleRubberBand that can be resized once created.

See Also