LEADTOOLS Annotations for WPF and Silverlight (Leadtools.Windows.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.31
AnnFreehandDrawDesigner Class
See Also  Members  
Leadtools.Windows.Annotations Namespace : AnnFreehandDrawDesigner Class



The AnnFreehandDrawDesigner Class supports WPF/Silverlight.

The AnnFreehandDrawDesigner Class is available in LEADTOOLS Document and Medical Imaging toolkits.

This class extends the AnnDrawDesigner class to provide functionality for drawing a freehand AnnPolylineObject on an annotation container. Supported in Silverlight, Windows Phone 7

Object Model

AnnFreehandDrawDesigner ClassAnnContainer ClassAnnObject ClassAnnObject Class

Syntax

Visual Basic (Declaration) 
Public Class AnnFreehandDrawDesigner 
   Inherits AnnDrawDesigner
Visual Basic (Usage)Copy Code
Dim instance As AnnFreehandDrawDesigner
C# 
public class AnnFreehandDrawDesigner : AnnDrawDesigner 
C++/CLI 
public ref class AnnFreehandDrawDesigner : public 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 BasicCopy Code
Public Function AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ByVal viewer As ImageViewer, ByVal container As AnnContainer) As AnnFreehandDrawDesigner
   ' start a new freehand draw designer
   Dim freehandDrawDesigner As AnnFreehandDrawDesigner = New AnnFreehandDrawDesigner(container)
   ' set up the object template (a 2 pixels-wide polyline)
   Dim polylineObject As AnnPolylineObject = New AnnPolylineObject()
   polylineObject.Stroke = Colors.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

   Return freehandDrawDesigner
End Function
C#Copy Code
public AnnFreehandDrawDesigner AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ImageViewer 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 = Colors.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;

   return freehandDrawDesigner;
}
SilverlightCSharpCopy Code
public AnnFreehandDrawDesigner AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ImageViewer 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 = Colors.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;

   return freehandDrawDesigner;
}
SilverlightVBCopy Code
Public Function AnnFreehandDrawDesigner_AnnFreehandDrawDesigner(ByVal viewer As ImageViewer, ByVal container As AnnContainer) As AnnFreehandDrawDesigner
   ' start a new freehand draw designer
   Dim freehandDrawDesigner As AnnFreehandDrawDesigner = New AnnFreehandDrawDesigner(container)
   ' set up the object template (a 2 pixels-wide polyline)
   Dim polylineObject As AnnPolylineObject = New AnnPolylineObject()

   polylineObject.Stroke = Colors.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

   Return freehandDrawDesigner
End Function

Inheritance Hierarchy

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

Requirements

Target Platforms: Silverlight 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7, MAC OS/X (Intel Only)

See Also

AnnFreehandDrawDesigner requires a Document/Medical product license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features and Unlocking Special LEAD Features.