Click or drag to resize

AnnotationController Class

The AnnotationController is the central hub for DotImage. It contains a LayerCollection for any number of LayerAnnotation objects, each containing any number of annotations.
Inheritance Hierarchy
SystemObject
  Atalasoft.Annotate.UIAnnotationController

Namespace:  Atalasoft.Annotate.UI
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.3.0.0.0.668 (.NET 4.5.2, x86)
Syntax
public class AnnotationController : IComponent, 
	IDisposable

The AnnotationController type exposes the following members.

Constructors
  NameDescription
Public methodAnnotationController
Creates a new instance of AnnotationController.
Public methodAnnotationController(IAnnotate)
Creates a new instance of AnnotationController specifying the IAnnotate parent control.
Top
Properties
  NameDescription
Public propertyActiveAnnotation
Gets or sets the currently selected annotation.
Public propertyAnnotationConfinement
Gets or sets the annotation confinement used to keep annotations within a specific area of the control.
Public propertyClipToDocument
Gets or sets a value indicating whether the annotation rendering is clipped to the document bounds.
Public propertyCreateMouseButton
Gets or sets the mouse button used for creating annotations.
Public propertyCurrentLayer
Gets or sets the current active layer.
Public propertyDefaultSecurity
Gets or sets the default security used for new annotations.
Public propertyFactories
Gets the AnnotationUIFactoryCollection containing IAnnotationUIFactory objects used to create annotations from AnnotationData classes.
Public propertyInteractMode
Gets or sets a value specifying the user interactive mode of the AnnotationController.
Public propertyIsDirty
Gets a value indicating whether the annotations have been modified since the last load or save.
Public propertyLayers
Gets or sets the LayerCollection used by the AnnotationController.
Public propertyMultiSelectKey
Gets or sets the key held down to select multiple annotations.
Public propertyParent
Gets or sets the IAnnotate parent control where the annotations will be rendered.
Public propertyCode exampleRotationSnapInterval

Gets or sets the interval used for snapping interactive rotation to degrees.

This is used to help users when rotating an annotation, making it easier to stop at whole degrees. The snap area is determined by the RotationSnapThreshold property.

Public propertyCode exampleRotationSnapThreshold
Gets or sets the amount of deviation from the RotationSnapInterval that will be used to snap to the rotation interval.
Public propertySelectedAnnotations
Gets an array of annotations currently selected.
Public propertySite

Gets or sets the site of the control.

Public propertySmoothingMode
Gets or sets the smoothing mode used when drawing annotations.
Public propertyToolTip
Gets or sets the tooltip control used for annotation tooltips.
Public propertyUndoManager
Gets the AnnotationUndoManager used by the controller.
Public propertyWaitingToCreate
Gets a value indicating whether the AnnotationController is waiting for the user to create an annotation with the mouse.
Top
Methods
  NameDescription
Public methodAnnotationFromPoint(PointF)
Returns the annotation located at a specific point on the control.
Public methodAnnotationFromPoint(LayerAnnotation, PointF)
Returns the annotation at the specified point of a specified layer.
Public methodCanPaste
Returns a value indicating whether there is annotation data on the clipboard.
Public methodChangeAnnotationPosition(ChangePositionMethod)
Changes the position of the selected annotation within the stacking order.
Public methodChangeAnnotationPosition(AnnotationUI, ChangePositionMethod)
Changes the position of an annotation or layer within the stacking order.
Public methodClearSelection
Unselects all of the selected annotations.
Public methodClone
Creates a copy of the AnnotationController including all of the layers and annotations.
Public methodCopy
Copies the selected annotation(s) to the clipboard.
Public methodCountAnnotations
Returns the number of annotations in all of the layers.
Public methodCountAnnotations(LayerAnnotation)
Returns the number of annotations in the provided layer.
Public methodCode exampleCreateAnnotation(AnnotationUI)
Call this method to prepare the AnnotationController for creating a new annotation with the mouse.
Public methodCreateAnnotation(AnnotationUI, CreateAnnotationMode)
Call this method to prepare the AnnotationController for creating a new annotation with the mouse, specifying the creation mode to use.
Public methodCut
Cuts the selected annotation(s) and places them onto the clipboard.
Public methodDispose
Releases memory used by the AnnotationController and all of its annotations.
Protected methodDispose(Boolean)
Releases resources used by the AnnotationController.
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodExitCreateMode
This method will exit 'create mode' started with CreateAnnotation(AnnotationUI).
Protected methodFinalize
Finalizes an instance of the AnnotationController class.
(Overrides ObjectFinalize.)
Public methodFindAnnotationLayer(AnnotationUI)
Returns the LayerAnnotation containing a specified annotation.
Public methodFindAnnotationLayer(LayerAnnotation, AnnotationUI)
Returns the LayerAnnotation containing a specified annotation.
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetTopLevelLayer
Returns the top level LayerAnnotation for the supplied annotation. This method will scan through the nested layers until it finds the top most layer.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGroup
Combines all selected annotations into a new LayerAnnotation object and adds this layer to the CurrentLayer.
Public methodGroup(AnnotationUI)
Combines annotations into a LayerAnnotation and adds it to the CurrentLayer.
Public methodInvalidateAnnotation
Forces an annotation to be redrawn.
Public methodLoad(Byte, AnnotationDataFormat)
Loads annotation data from a byte array and adds the annotations to the Layers collection.
Public methodLoad(Byte, IFormatter)
Loads annotation data from a byte array using the supplied formatter and adds them to the Layers.
Public methodLoad(Stream, AnnotationDataFormat)
Loads annotation data from a stream and adds the annotations to the Layers collection.
Public methodLoad(Stream, IFormatter)
Loads annotation data from a stream using the supplied formatter into the Layers collection.
Public methodLoad(String, AnnotationDataFormat)
Loads annotation data from a file and adds the annotations to the Layers collection.
Public methodLoad(String, IFormatter)
Loads annotation data from a file using the supplied formatter and adds the annotations to the Layers collection.
Public methodLoad(Byte, LayerAnnotation, AnnotationDataFormat)
Loads annotation data from a byte array and adds the annotations to the specified layer.
Public methodLoad(Byte, LayerAnnotation, IFormatter)
Loads annotation data into the specified layer using the provided formatter.
Public methodLoad(Stream, LayerAnnotation, AnnotationDataFormat)
Loads annotation data from a stream and adds the annotations to the specified layer.
Public methodLoad(Stream, LayerAnnotation, IFormatter)
Loads annotation data from a stream using the formatter and adds the annotations to the provided layer.
Public methodLoad(String, LayerAnnotation, AnnotationDataFormat)
Loads annotation data from a file and adds the annotations to the specified layer.
Public methodLoad(String, LayerAnnotation, IFormatter)
Loads annotation data from a file using the formatter and adds the annotations to the provided layer.
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodNotifyController
This method is used by layer and annotation objects to notify the AnnotationController of events.
Protected methodOnAnnotationCreated
Called when a new annotation has been created by the user.
Protected methodOnClick
Called when a Click event is received from the parent control.
Protected methodOnCurrentLayerChanged
Called when the CurrentLayer property has changed.
Protected methodOnDoubleClick
Called when a DoubleClick event has been received from the parent control.
Protected methodOnHotSpotClicked
Called when a hot spot annotation has been clicked.
Protected methodOnMouseDown
Called when a MouseDown event is received from the parent control.
Protected methodOnMouseMove
Called when a MouseMove event is received from the parent control.
Protected methodOnMouseUp
Called when a MouseUp event is received from the parent control.
Protected methodOnMoving
Called while an annotation is being moved by the user.
Protected methodOnPaint
Called when a Paint event is received from the parent control.
Protected methodOnResizing
Called while an annotation is being resized by the user.
Protected methodOnRotating
Called while the annotation is being rotated by the user.
Protected methodOnScrollPositionChanged
Called when a scroll event has been detected.
Protected methodOnSelectionChanged
Called when an annotation selection has changed.
Public methodPaste
Pastes annotation data from the clipboard into the current layer.
Public methodRefresh
This method will cause the control to redraw itself.
Public methodCode exampleRenderAnnotations(AnnotationImage)
Renders the annotations to the supplied image.
Public methodRenderAnnotations(RenderDevice, Graphics)
Renders the annotations to a Graphics object
Public methodRenderAnnotations(RenderDevice, Graphics, LayerAnnotation)
Renders the annotations in a specified layer to a Graphics object.
Public methodResumePaint
Public methodRotateDocument(DocumentRotation)
Rotates all layers in the Layers collection.
Public methodRotateDocument(DocumentRotation, LayerAnnotation)
Rotates the specified layer.
Public methodRotateDocument(DocumentRotation, Int32)
Rotates the annotations in 90 degree increments.
Public methodSave(IFormatter)
Saves the annotations to a byte array using the specified formatter.
Public methodSave(Stream, AnnotationDataFormat)
Writes annotation data to the specified stream.
Public methodSave(Stream, IFormatter)
Saves the annotations to a stream using the specified formatter.
Public methodSave(String, AnnotationDataFormat)
Saves the annotations to a file using a predefined formatter.
Public methodSave(String, IFormatter)
Saves the annotations to a file using the specified formatter.
Public methodSave(LayerAnnotation, IFormatter)
Returns a byte array containing the annotation data from a specified LayerAnnotation. This is useful when saving annotation data to be embedded into image metadata.
Public methodSave(Stream, LayerAnnotation, AnnotationDataFormat)
Writes annotation data from a layer into the specified stream.
Public methodSave(Stream, LayerAnnotation, IFormatter)
Saves the specified layer to a stream using the formatter supplied.
Public methodSave(String, LayerAnnotation, AnnotationDataFormat)
Saves a layer to a file using a predefined format.
Public methodSave(String, LayerAnnotation, IFormatter)
Saves a layer to a file using the specified formatter.
Public methodSelectAll
Selects all of the annotations on the current layer or all layers.
Public methodSelectFromBounds(RectangleF, Boolean)
Selects annotations that are partially or fully within a rectangular area.
Public methodSelectFromBounds(LayerAnnotation, RectangleF, Boolean)
Selects annotations from a layer that are without a bounding region.
Public methodSuspendPaint
Use this method to suspend painting any annotations until the ResumePaint method is called.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodUngroup
Ungroups the currently selected annotation.
Public methodUngroup(LayerAnnotation, LayerAnnotation)
Removes annotations from one layer and adds them to another.
Top
Events
  NameDescription
Public eventAnnotationCreated
Raised when an annotation is created by the user.
Public eventAnnotationDeserialization
Raised when an object is deserialized to allow developers to cancel or modify the object before its added into the controller.
Public eventClick
Raised when an annotation is clicked with the mouse.
Public eventCurrentLayerChanged
Raised when the CurrentLayer property has changed.
Public eventDisposed
Raised when the AnnotationController has been disposed.
Public eventDoubleClick
Raised when an annotation is double-clicked by the user.
Public eventHotSpotClicked
Raised when a hot spot annotation is clicked.
Public eventMoved
Raised when an annotation is moved.
Public eventMoving
Raised while an annotation is being moved.
Public eventResized
Raised when an annotation is resized.
Public eventResizing
Raised while an annotation is being resized.
Public eventRotated
Raised when an annotation is rotated by the user.
Public eventRotating
Raised while an annotation is being rotated by the user.
Public eventSelectionChanged
Raise when there has been a change in the annotation selection.
Top
See Also