Click or drag to resize

AnnotationBrush Class

This class describes a brush object used for drawing annotations.
Inheritance Hierarchy
SystemObject
  Atalasoft.AnnotateAnnotationBrush

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

The AnnotationBrush type exposes the following members.

Constructors
  NameDescription
Public methodAnnotationBrush(Color)
Creates a solid brush with the specified color.
Public methodAnnotationBrush(AnnotationImage)
Creates a texture brush using the specified image.
Public methodAnnotationBrush(HatchStyle, Color)
Creates a hatch brush with the specified hatch style and forecolor.
Public methodAnnotationBrush(SerializationInfo, StreamingContext)
Creates a brush from serialized information.
Public methodAnnotationBrush(AnnotationImage, WrapMode)
Creates a new texture brush with the specified image and wrap mode.
Public methodAnnotationBrush(AnnotationImage, Rectangle)
Creates a texture brush using the specified image and bounding rectangle.
Public methodAnnotationBrush(AnnotationImage, RectangleF)
Creates a texture brush using the specified image and bounding rectangle.
Public methodAnnotationBrush(HatchStyle, Color, Color)
Creates a hatch brush with the specified hatch style, forecolor and background color.
Public methodAnnotationBrush(AnnotationImage, WrapMode, Rectangle)
Creates a texture brush with the specified image, wrap mode and bounding rectangle.
Public methodAnnotationBrush(AnnotationImage, WrapMode, RectangleF)
Creates a texture brush with the specified image, wrap mode and bounding rectangle.
Public methodAnnotationBrush(Point, Point, Color, Color)
Creates a linear gradient brush using the specified start point, end point, start color and end color.
Public methodAnnotationBrush(PointF, PointF, Color, Color)
Creates a linear gradient brush using the specified start point, end point, start color and end color.
Public methodAnnotationBrush(Rectangle, Color, Color, LinearGradientMode)
Creates a linear gradient brush with the bounding rectangle, starting and ending colors, and the gradient orientation.
Public methodAnnotationBrush(RectangleF, Color, Color, LinearGradientMode)
Creates a linear gradient brush with the bounding rectangle, starting and ending colors, and the gradient orientation.
Top
Properties
  NameDescription
Public propertyColor
Gets or sets the color of a solid brush.
Public propertyFillType
Gets or sets the type of brush used.
Public propertyHatchBackColor
Gets or sets the hatch background color of a hatch brush.
Public propertyHatchForeColor
Gets or sets the hatch forecolor of a hatch brush.
Public propertyHatchStyle
Gets or sets the hatch style of a hatch brush.
Public propertyImage
Gets or sets the image used for a texture brush.
Public propertyLinearColors
Gets or sets the colors used by a linear gradient brush.
Public propertyLinearGradientMode
The orientation of a linear gradient brush.
Public propertyRectangle
The bounding rectangle a texture or linear gradient brush.
Public propertyWrapMode
Gets or sets the wrap mode of a texture brush.
Top
Methods
  NameDescription
Public methodClone
Creates a copy of the AnnotationBrush object.
Public methodEquals
Used to compare two AnnotationBrush objects.
(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 the brush.
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 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 has been changed.
Public methodToString
Returns a information about this AnnotationBrush.
(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 brush or equivalent for the drawing environment of its choice.
Examples
The code below creates a RectangleAnnotation with a solid brush and black 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