Click or drag to resize

AnnotationPen Class

This class represents a pen object used for drawing lines of annotations.
Inheritance Hierarchy
SystemObject
  Atalasoft.AnnotateAnnotationPen

Namespace:  Atalasoft.Annotate
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: 11.4.0.9.0.377 (.NET 4.5.2, x86)
Syntax
[SerializableAttribute]
[TypeConverterAttribute(typeof(AnnotationPenConverter))]
public class AnnotationPen : ISerializable

The AnnotationPen type exposes the following members.

Constructors
  NameDescription
Public methodAnnotationPen(Color)
Creates a new instance of AnnotationPen specifying the color of the pen.
Public methodAnnotationPen(AnnotationBrush)
Creates a new instance of AnnotationPen from an AnnotationBrush object.
Public methodAnnotationPen(Color, Single)
Creates a new instance of AnnotationPen specifying the color and width of the pen.
Public methodAnnotationPen(SerializationInfo, StreamingContext)
Creates a new instance of AnnotationPen from serialized data.
Public methodAnnotationPen(AnnotationBrush, Single)
Creates a new instance of AnnotationPen specifying the AnnotationBrush and pen width.
Top
Properties
  NameDescription
Public propertyAlignment
Gets or sets the AnnotationPenAlignment for the pen.
Public propertyBrush
Gets or sets the AnnotationBrush used to describe this pen.
Public propertyColor
Gets or sets the color for the pen.
Public propertyDashCap
Gets or sets the DashCap used at the end of the dashes that make up dashed lines drawn with this pen.
Public propertyDashOffset
Gets or sets the distance from the start of a line to the beginning of a dash pattern.
Public propertyDashPattern
Gets or sets the dash pattern used
Public propertyDashStyle
Gets or sets the style used for dashed lines drawn with this pen.
Public propertyEndCap
Gets or sets the AnnotationLineCap used at the end of lines drawn with this pen.
Public propertyLineJoin
Gets or sets the join style for the ends of two consecutive lines drawn with this pen.
Public propertyMiterLimit
Gets or sets the limit of the thickness of the join on a mitered corner.
Public propertyStartCap
Gets or sets the AnnotationLineCap used at the beginning of lines drawn with this pen.
Public propertyWidth
Gets or sets the width of the pen.
Top
Methods
  NameDescription
Public methodClone
Creates a copy of this AnnotationPen.
Public methodEquals
Compares this AnnotationPen with another to test if they are equal.
(Overrides ObjectEquals(Object).)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Returns an identifier for this object.
(Overrides ObjectGetHashCode.)
Public methodGetObjectData
Fills a SerializationInfo object with information about this AnnotationPen.
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnAnnotationControllerNotification
Called to notify the AnnotationController after a property has been changed.
Protected methodOnPropertyChanged
Called when a property value has changed and raises the PropertyChanged event.
Protected methodOnPropertyChanging
Called before a property is changed.
Protected methodRemoveLineCapEvents
This is a helper method used to remove event handler for an AnnotationLineCap object.
Protected methodSetLineCapEvents
This is a helper method used to add event handling to an AnnotationLineCap.
Public methodToString
Returns a string representation of this object.
(Overrides ObjectToString.)
Top
Events
  NameDescription
Public eventAnnotationControllerNotification
Raised after a property of the AnnotationBrush if modified.
Public eventPropertyChanged
Raised when a property value has changed.
Public eventPropertyChanging
Raised just before a property is about to be modified.
Top
Remarks
The IAnnotationRenderer for each annotation will use this information to construct a pen or equivalent for the drawing environment of its choice.
Examples
The code below creates a RectangleAnnotation with a black 1 pixel border.
CreateRectAnn
RectangleAnnotation rect = new RectangleAnnotation(RectangleF.Empty, new AnnotationBrush(Color.Red), new AnnotationPen(Color.Black, 1));
((RectangleGrips)rect.Grips).GripsToDisplay = RectangleGripDisplay.Both;
this.annotateViewer1.Annotations.CreateAnnotation(rect);
CreateRectAnn
Dim rect As RectangleAnnotation =  New RectangleAnnotation(RectangleF.Empty,New AnnotationBrush(Color.Red),New AnnotationPen(Color.Black,1)) 
((RectangleGrips)rect.Grips).GripsToDisplay = RectangleGripDisplay.Both
Me.annotateViewer1.Annotations.CreateAnnotation(rect)
See Also