Click or drag to resize

Rubberband Class

A base class which all rubber bands inherit from.
Inheritance Hierarchy

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

The Rubberband type exposes the following members.

Constructors
  NameDescription
Protected methodRubberband
Initializes a new instance of the Rubberband class
Protected methodRubberband(Viewport)
Initializes a new instance of the Rubberband class
Top
Properties
  NameDescription
Public propertyActive
Gets or sets a value indicating if the rubberband is active in the parent Viewport control.
Public propertyActiveButtons
Gets or sets a value indicating which mouse buttons are used to draw the rubberband.
Public propertyAspectRatio
Gets or sets the aspect ratio which the rubberband will be constrained to.
Public propertyBackgroundColor
Gets or sets the background color of a dashed line.
Public propertyBounds
Gets or sets the rectangular area occupied by the rubberband in image pixel coordinates.
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.
Public propertyConstrainPosition
Gets or sets a value indicating if the RubberBand can be drawn outside the image area.
Public propertyContainer
Gets the IContainer that contains the Component.
(Inherited from Component.)
Public propertyCursor
Gets or sets the cursor which is displayed in the parent Viewport when active.
Protected propertyCursorPad
Gets or sets the amount of padding for the cursor to change and to allow adjusting the existing selection.
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.
Protected propertyEvents
Gets the list of event handlers that are attached to this Component.
(Inherited from Component.)
Public propertyInverted
Gets or sets a value indicating if the rubberband is drawn inverted.
Protected propertyIsDragging
Gets or sets a value indicating whether the Rubberband is being dragged.
Public propertyMoveCursor

Gets or sets the cursor used when moving the rubberband.

Public propertyMoveWhenInside
Gets or sets a value indicating if the rubberband can be moved with the mouse.
Public propertyParent
Gets or sets the parent ViewPort control.
Public propertyPen
Gets or sets a value of the pen which is used to draw the rubberband.
Public propertyPersist
Gets or sets a value indicating if the rubberband continues to display after the mouse button is released.
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.
Protected propertyStartPoint
Gets or sets the starting point of the Rubberband. Normally this is the top-left corner.
Public propertyVisible
Gets or sets a value indicating if the rubberband is currently visible.
Top
Methods
  NameDescription
Public methodCancel
Cancels dragging a new 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.
(Overrides ComponentDispose(Boolean).)
Protected methodDrawRegion
Called when a region needs to be drawn.
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.
Protected methodFinalize (Overrides ComponentFinalize.)
Protected methodGetConstrainedPoint
Returns a point that is within the image bounds and snap to the pixel grid.
Public methodGetDisplayBounds
Returns a Rectangle representing the rectangular rubberband boundary in Viewport display coordinates.
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
Inheriting classes must implement this method and return the region occupied by the rubber band.
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.
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.
Protected methodOnActiveChanged
Called when the Active property has changed and raises the ActiveChanged event.
Protected methodOnAspectRatioChanged
Called when the AspectRatio property has changed and raises the AspectRatioChanged event.
Protected methodOnBackgroundColorChanged
Called when the BackgroundColor property has changed and raises the BackgroundColorChanged event.
Protected methodOnChanged
Called when the Rubberband has changed.
Protected methodOnChanging
Called when the Rubberband is in the process of changing.
Protected methodOnClickLockChanged
Called when the ClickLock property has changed and raises the ClickLockChanged event.
Protected methodOnConstrainPositionChanged
Called when the ConstrainPosition property has changed and raises the ConstrainPositionChanged event.
Protected methodOnCursorChanged
Called when the Cursor property has changed and raises the CursorChanged event.
Protected methodOnDrawRubberband
Draws the Rubberband using the provided Canvas and pen.
Protected methodOnInvertedChanged
Called when the Inverted property has changed and raises the InvertedChanged event.
Protected methodOnMouseDown
Called when a mouse button is pressed over the Rubberband.
Protected methodOnMouseMove
Called when the mouse is moved over the Rubberband.
Protected methodOnMouseUp
Called when a mouse button is released over the Rubberband.
Protected methodOnMoveCursorChanged
Called when the MoveCursor property has changed and raises the MoveCursorChanged event.
Protected methodOnMoveWhenInsideChanged
Called when the MoveWhenInside property has changed and raises the MoveWhenInsideChanged event.
Protected methodOnPaint
Called when the Rubberband needs to be painted.
Protected methodOnParentChanged
Called when the Parent property has changed and raises the ParentChanged event.
Protected methodOnPenChanged
Called when the Pen property has changed and raises the PenChanged event.
Protected methodOnPersistChanged
Called when the Persist property has changed and raises the PersistChanged event.
Protected methodOnSnapToPixelGridChanged
Called when the SnapToPixelGrid property has changed and raises the SnapToPixelGridChanged event.
Protected methodOnVisibleChanged
Called when the Visible property has changed and raises the VisibleChanged event.
Protected methodPixelPointFromDisplayPoint
Returns the pixel position from the specified display position.
Protected methodPixelPointToDisplayPoint
Returns the display position from a pixel position.
Public methodSetDisplayBounds
Sets the rectangular boundary of the rubberband by using Viewport coordinates.
Public methodStart
Programmatically starts a new rubberband without user interaction.
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.
Public eventActiveChanged
Occurs when Active changes.
Public eventAspectRatioChanged
Occurs when AspectRatio changes.
Public eventBackgroundColorChanged
Occurs when BackgroundColor changes.
Public eventChanged
Occurs when the rubber band changes size (occurs on the MouseUp Event).
Public eventChanging
Occurs when the rubber band is changing size (occurs on the MouseMove Event).
Public eventClickLockChanged
Occurs when ClickLock changes.
Public eventConstrainPositionChanged
Occurs when ConstrainPosition changes.
Public eventCursorChanged
Occurs when %Cursor% changes.
Public eventDisposed
Occurs when the component is disposed by a call to the Dispose method.
(Inherited from Component.)
Public eventInvertedChanged
Occurs when Inverted changes.
Public eventMoveCursorChanged
Occurs when %MoveCursor% changes.
Public eventMoveWhenInsideChanged
Occurs when MoveWhenInside changes.
Public eventParentChanged
Occurs when %Parent% changes.
Public eventPenChanged
Occurs when Pen changes.
Public eventPersistChanged
Occurs when Persist changes.
Public eventSnapToPixelGridChanged
Occurs when SnapToPixelGrid changes.
Public eventVisibleChanged
Occurs when Visible changes.
Top
Remarks
Allows entities to be drawn onto a Viewport by clicking and dragging with the mouse. Derived classes can draw lines, rectangles, and ellipses and be used to draw primitives and make region selections.
See Also