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



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

Defines an annotation point object.

Object Model

AnnPointObject ClassAnnRectangle StructureAnnBrush ClassAnnPoint StructureAnnContainer ClassAnnPicture ClassAnnFont ClassAnnGroupObject ClassAnnFont ClassAnnPoint StructureAnnPoint StructureAnnPen ClassAnnPicture ClassAnnLength StructureAnnPoint StructureAnnPoint StructureAnnUnitConverter Class

Syntax

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

Example

This example adds a new point object to a container.

Visual BasicCopy Code
Private Sub AnnPointObject_AnnPointObject(ByVal viewer As RasterImageViewer, ByVal container As AnnContainer)
   Dim point As AnnPointObject = New AnnPointObject()
   point.CenterPoint = New AnnPoint(100, 100, AnnUnit.Pixel)
   point.ShowPicture = True
   ' default picture, no need to change anything
   container.Objects.Add(point)
   viewer.Invalidate(point.InvalidRectangle)
   MessageBox.Show("Picture")

   ' show with a radius
   point.Radius = New AnnLength(16, AnnUnit.Pixel)
   point.Pen = New AnnPen(Color.Red, New AnnLength(1, AnnUnit.Pixel))
   point.ShowPicture = False
   viewer.Invalidate(point.InvalidRectangle)
   MessageBox.Show("No picture")
End Sub
C#Copy Code
private void AnnPointObject_AnnPointObject(RasterImageViewer viewer, AnnContainer container)
{
   AnnPointObject point = new AnnPointObject();
   point.CenterPoint = new AnnPoint(100, 100, AnnUnit.Pixel);
   point.ShowPicture = true;
   // default picture, no need to change anything
   container.Objects.Add(point);
   viewer.Invalidate(point.InvalidRectangle);
   MessageBox.Show("Picture");

   // show with a radius
   point.Radius = new AnnLength(16, AnnUnit.Pixel);
   point.Pen = new AnnPen(Color.Red, new AnnLength(1, AnnUnit.Pixel));
   point.ShowPicture = false;
   viewer.Invalidate(point.InvalidRectangle);
   MessageBox.Show("No picture");
}

Remarks

The point object is a single point. This object works in two ways: If the value of ShowPicture is true; this object will draw the picture in Picture with CenterPoint as the center point. AnnDrawable.Pen, AnnDrawable.Brush and Radius will be ignored. If ShowPicture is false; this object will draw an ellipse using AnnDrawable.Pen, AnnDrawable.Brush and Radius around CenterPoint.

This class implements the IAnnPictureObject interface and accesses the IAnnPictureObject.Picture property that handles the picture associated with the annotation object.

For more information, refer to Using Pictures in Annotation Objects

For more information about the point annotation object refer to AnnPointObject. For more information about the automated point annotation object, refer to Annotation Objects - Automated Features and Automated Annotations - Point Tab.

Inheritance Hierarchy

System.Object
   Leadtools.Annotations.AnnDrawable
      Leadtools.Annotations.AnnObject
         Leadtools.Annotations.AnnPointObject

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