Leadtools.Annotations Requires Document/Medical product license | Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.10.31
AnnFreehandDrawDesigner Class
See Also  Members   Example 
Leadtools.Annotations Namespace : AnnFreehandDrawDesigner Class




This class extends the AnnDrawDesigner class to provide functionality for drawing a freehand AnnPolylineObject on an annotation container.

Object Model




Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnFreehandDrawDesigner 
   Inherits AnnDrawDesigner
Visual Basic (Usage)Copy Code
Dim instance As AnnFreehandDrawDesigner
C# 
[SerializableAttribute()]
public class AnnFreehandDrawDesigner : AnnDrawDesigner 
Managed Extensions for C++ 
[SerializableAttribute()]
public __gc class AnnFreehandDrawDesigner : public AnnDrawDesigner 
C++/CLI 
[SerializableAttribute()]
public ref class AnnFreehandDrawDesigner : public AnnDrawDesigner 

Example

For a complete example on how to use annotation draw and edit designers, refer to <see cref="AnnDesigner"/> This example initializes a new designer to draw freehand polylines with spaces set to 2

Visual BasicCopy Code
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
C#Copy Code
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; 
}

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDesigner
      Leadtools.Annotations.AnnDrawDesigner
         Leadtools.Annotations.AnnFreehandDrawDesigner

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Leadtools.Annotations requires a Document or Medical toolkit license and unlock key. For more information, refer to: Raster Pro/Document/Medical Features