LEADTOOLS Annotations (Leadtools.Annotations assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.29
AnnLineObject Class
See Also  Members  
Leadtools.Annotations Namespace : AnnLineObject Class



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

Defines an annotation line object.

Object Model

AnnLineObject ClassAnnRectangle StructureAnnBrush ClassAnnContainer ClassAnnPoint StructureAnnFont ClassAnnGroupObject ClassAnnFont ClassAnnPoint StructureAnnPoint StructureAnnPen ClassAnnPoint StructureAnnPoint StructureAnnPoint StructureAnnUnitConverter Class

Syntax

Visual Basic (Declaration) 
<SerializableAttribute()>
Public Class AnnLineObject 
   Inherits AnnObject
   Implements ICloneableIDisposableISerializable 
Visual Basic (Usage)Copy Code
Dim instance As AnnLineObject
C# 
[SerializableAttribute()]
public class AnnLineObject : AnnObject, ICloneableIDisposableISerializable  
C++/CLI 
[SerializableAttribute()]
public ref class AnnLineObject : public AnnObject, ICloneableIDisposableISerializable  

Example

This example creates a new line object from 100, 200 to 400, 600 pixels with red pen and then adds it to a container.

Visual BasicCopy Code
Private Sub AnnLineObject_AnnLineObject(ByVal container As AnnContainer)
   Dim line As AnnLineObject = New AnnLineObject()
   line.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
   line.StartPoint = New AnnPoint(100, 200, AnnUnit.Pixel)
   line.EndPoint = New AnnPoint(400, 600, AnnUnit.Pixel)
   container.Objects.Add(line)
End Sub
C#Copy Code
private void AnnLineObject_AnnLineObject(AnnContainer container)
{
   AnnLineObject line = new AnnLineObject();
   line.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));
   line.StartPoint = new AnnPoint(100, 200, AnnUnit.Pixel);
   line.EndPoint = new AnnPoint(400, 600, AnnUnit.Pixel);
   container.Objects.Add(line);
}

Remarks

The line annotation object is a simple line that has a start point, an end point and a pen. For more information about the line annotation object refer to AnnLineObject. For more information about the automated line annotation object, refer to Annotation Objects - Automated Features.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnLineObject
            Leadtools.Annotations.AnnPointerObject
            Leadtools.Annotations.AnnRulerObject

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

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