This class extends the AnnDrawDesigner class to provide functionality for drawing a freehand AnnPolylineObject on an annotation container.
[SerializableAttribute()]
public class AnnFreehandDrawDesigner : AnnDrawDesigner
<SerializableAttribute()>
Public Class AnnFreehandDrawDesigner
Inherits Leadtools.Annotations.AnnDrawDesigner
[SerializableAttribute()]
public ref class AnnFreehandDrawDesigner : public Leadtools.Annotations.AnnDrawDesigner
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
using Leadtools;
using Leadtools.Annotations;
using Leadtools.Codecs;
using Leadtools.WinForms;
public AnnFreehandDrawDesigner AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(RasterImageViewer viewer, AnnContainer container)
{
// start a new freehand draw designer
AnnFreehandDrawDesigner freehandDrawDesigner = new AnnFreehandDrawDesigner();
// set up the object template (a 2 pixels-wide polyline)
AnnPolylineObject polylineObject = new AnnPolylineObject();
polylineObject.Pen = new AnnPen(Color.Red, new AnnLength(2, AnnUnit.Pixel));
// set up the spacing of the freehand designer
freehandDrawDesigner.Spacing = 2;
// initialize the rest of the designer
freehandDrawDesigner.ObjectTemplate = polylineObject;
freehandDrawDesigner.Owner = viewer;
freehandDrawDesigner.ClipCursor = true;
freehandDrawDesigner.Container = container;
return freehandDrawDesigner;
}
Imports Leadtools
Imports Leadtools.Annotations
Imports Leadtools.Codecs
Imports Leadtools.WinForms
Public Function AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ByVal viewer As RasterImageViewer, ByVal container As AnnContainer) As AnnFreehandDrawDesigner
' start a new freehand draw designer
Dim freehandDrawDesigner As AnnFreehandDrawDesigner = New AnnFreehandDrawDesigner()
' set up the object template (a 2 pixels-wide polyline)
Dim polylineObject As AnnPolylineObject = New AnnPolylineObject()
polylineObject.Pen = New AnnPen(Color.Red, New AnnLength(2, AnnUnit.Pixel))
' set up the spacing of the freehand designer
freehandDrawDesigner.Spacing = 2
' initialize the rest of the designer
freehandDrawDesigner.ObjectTemplate = polylineObject
freehandDrawDesigner.Owner = viewer
freehandDrawDesigner.ClipCursor = True
freehandDrawDesigner.Container = container
Return freehandDrawDesigner
End Function
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET