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




Defines an annotation cross product object.

Object Model




















Syntax

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

Example

This example creates a cross product object.

Visual BasicCopy Code
Private Sub AnnCrossProductObject_AnnCrossProductObject(ByVal container As AnnContainer)
   Dim crossProduct As AnnCrossProductObject = New AnnCrossProductObject()
   crossProduct.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
   crossProduct.Font = New AnnFont("Arial", New AnnLength(10, AnnUnit.Point), FontStyle.Regular)
   crossProduct.FirstStartPoint = New AnnPoint(5, 5, AnnUnit.Inch)
   crossProduct.FirstEndPoint = New AnnPoint(10, 10, AnnUnit.Inch)
   ' make this cross product symmetrical
   crossProduct.UpdateSecondPoints()
   ' update the intersection point
   crossProduct.UpdateIntersectionPoint()
   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
   container.Objects.Add(crossProduct)
   ' show the intersection point
   MessageBox.Show(String.Format("Intersection point is at: {0}", crossProduct.IntersectionPoint))
End Sub
C#Copy Code
private void AnnCrossProductObject_AnnCrossProductObject(AnnContainer container) 

   AnnCrossProductObject crossProduct = new AnnCrossProductObject(); 
   crossProduct.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel)); 
   crossProduct.Font = new AnnFont("Arial", new AnnLength(10, AnnUnit.Point), FontStyle.Regular); 
   crossProduct.FirstStartPoint = new AnnPoint(5, 5, AnnUnit.Inch); 
   crossProduct.FirstEndPoint = new AnnPoint(10, 10, AnnUnit.Inch); 
   // make this cross product symmetrical 
   crossProduct.UpdateSecondPoints(); 
   // update the intersection point 
   crossProduct.UpdateIntersectionPoint(); 
   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; 
   container.Objects.Add(crossProduct); 
   // show the intersection point 
   MessageBox.Show(String.Format("Intersection point is at: {0}", crossProduct.IntersectionPoint)); 
}

Remarks

The cross-product annotation object consists of two rulers intersecting at right angles. The intersection point of a cross product object updates dynamically and can be obtained through the IntersectionPoint property.

For more information about the crossproduct annotation object refer to AnnCrossProductObject. For more information about the automated crossproduct annotation object, refer to Annotation Objects - Automated Features.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnCrossProductObject

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