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



This class extends the AnnDrawDesigner class to provide functionality for drawing an AnnCrossProductObject on an annotation container.

Object Model




Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnCrossProductDrawDesigner 
   Inherits AnnDrawDesigner
Visual Basic (Usage)Copy Code
Dim instance As AnnCrossProductDrawDesigner
C# 
[SerializableAttribute()]
public class AnnCrossProductDrawDesigner : AnnDrawDesigner 
C++/CLI 
[SerializableAttribute()]
public ref class AnnCrossProductDrawDesigner : 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 cross-product objects

Visual BasicCopy Code
Public Function AnnCrossProductDrawDesigner_AnnCrossProductDrawDesigner(ByVal viewer As RasterImageViewer, ByVal container As AnnContainer) As AnnCrossProductDrawDesigner
   ' start a new cross-product draw designer
   Dim crossProductDrawDesigner As AnnCrossProductDrawDesigner = New AnnCrossProductDrawDesigner()

   ' set up the object template (the cross product)
   Dim crossProduct As AnnCrossProductObject = New AnnCrossProductObject()
   crossProduct.MeasurementUnit = AnnUnit.Inch
   crossProduct.TickMarksLength = New AnnLength(0.25F, AnnUnit.Inch)
   crossProduct.ShowTickMarks = True
   crossProduct.GaugeLength = New AnnLength(1.0F, AnnUnit.Inch)
   crossProduct.ShowGauge = True
   crossProduct.ShowLength = True
   crossProduct.Precision = 2

   ' initialize the rest of the designer
   crossProductDrawDesigner.ObjectTemplate = crossProduct
   crossProductDrawDesigner.Owner = viewer
   crossProductDrawDesigner.ClipCursor = True
   crossProductDrawDesigner.Container = container

   Return crossProductDrawDesigner
End Function
C#Copy Code
public AnnCrossProductDrawDesigner AnnCrossProductDrawDesigner_AnnCrossProductDrawDesigner(RasterImageViewer viewer, AnnContainer container) 

   // start a new cross-product draw designer 
   AnnCrossProductDrawDesigner crossProductDrawDesigner = new AnnCrossProductDrawDesigner(); 
 
   // set up the object template (the cross product) 
   AnnCrossProductObject crossProduct = new AnnCrossProductObject(); 
   crossProduct.MeasurementUnit = AnnUnit.Inch; 
   crossProduct.TickMarksLength = new AnnLength(0.25F, AnnUnit.Inch); 
   crossProduct.ShowTickMarks = true; 
   crossProduct.GaugeLength = new AnnLength(1.0F, AnnUnit.Inch); 
   crossProduct.ShowGauge = true; 
   crossProduct.ShowLength = true; 
   crossProduct.Precision = 2; 
 
   // initialize the rest of the designer 
   crossProductDrawDesigner.ObjectTemplate = crossProduct; 
   crossProductDrawDesigner.Owner = viewer; 
   crossProductDrawDesigner.ClipCursor = true; 
   crossProductDrawDesigner.Container = container; 
 
   return crossProductDrawDesigner; 
}

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDesigner
      Leadtools.Annotations.AnnDrawDesigner
         Leadtools.Annotations.AnnCrossProductDrawDesigner

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family

See Also

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