This class extends the
AnnDrawDesigner class to provide functionality for drawing a freehand
AnnPolylineObject on an annotation container.
Object Model
Syntax
Visual Basic (Declaration) | |
---|
Public Class AnnFreehandDrawDesigner
Inherits AnnDrawDesigner |
Example
For a complete example on how to use annotation draw and edit designers, refer to AnnDesigner
This example initializes a new designer to draw freehand polylines with spaces set to 2
Visual Basic | Copy Code |
---|
Public Function AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ByVal viewer As BitmapSourceViewer, ByVal container As AnnContainer) As AnnFreehandDrawDesigner
Dim freehandDrawDesigner As AnnFreehandDrawDesigner = New AnnFreehandDrawDesigner(container)
Dim polylineObject As AnnPolylineObject = New AnnPolylineObject()
polylineObject.Stroke = Brushes.Red
polylineObject.StrokeThickness = 2.0
freehandDrawDesigner.Spacing = 2
freehandDrawDesigner.ObjectTemplate = polylineObject
freehandDrawDesigner.IsClipCursor = True
Return freehandDrawDesigner
End Function |
C# | Copy Code |
---|
public AnnFreehandDrawDesigner AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(BitmapSourceViewer viewer, AnnContainer container) { // start a new freehand draw designer AnnFreehandDrawDesigner freehandDrawDesigner = new AnnFreehandDrawDesigner(container); // set up the object template (a 2 pixels-wide polyline) AnnPolylineObject polylineObject = new AnnPolylineObject(); polylineObject.Stroke = Brushes.Red; polylineObject.StrokeThickness = 2.0; // set up the spacing of the freehand designer freehandDrawDesigner.Spacing = 2; // initialize the rest of the designer freehandDrawDesigner.ObjectTemplate = polylineObject; freehandDrawDesigner.IsClipCursor = true; return freehandDrawDesigner; } |
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003 family
See Also