LineAnnotation Constructor

Apitron PDF Kit help
Apitron.PDF.Kit library for .NET
Initializes a new instance of the Object class.

Namespace:  Apitron.PDF.Kit.Interactive.Annotations
Assembly:  Apitron.PDF.Kit (in Apitron.PDF.Kit.dll) Version: 2.0.37.0 (2.0.37.0)
Syntax

public LineAnnotation(
	double xStart,
	double yStart,
	double xEnd,
	double yEnd,
	AnnotationFlags flags = AnnotationFlags.Default,
	AnnotationBorderStyle borderStyle = null
)

Parameters

xStart
Type: SystemDouble
The x start.
yStart
Type: SystemDouble
The y start.
xEnd
Type: SystemDouble
The x end.
yEnd
Type: SystemDouble
The y end.
flags (Optional)
Type: Apitron.PDF.Kit.Interactive.AnnotationsAnnotationFlags
The flags.
borderStyle (Optional)
Type: Apitron.PDF.Kit.Interactive.AnnotationsAnnotationBorderStyle
The border style.
Examples

LineAnnotation lineAnnotation = new LineAnnotation(100, 300, 500, 100, AnnotationFlags.Default, new AnnotationBorderStyle(2, AnnotationBorderType.Dashed, new BoxStyleDashPattern(new int[] { 5, 5 })));
lineAnnotation.UseCaption = true;
lineAnnotation.Contents = "This is the line annotation";
lineAnnotation.CaptionPosition = AnnotationCaptionPosition.Inline;

lineAnnotation.LeaderLineOffset = 10;
lineAnnotation.LeaderLineLength = 30;
lineAnnotation.LeaderLineExtensions = 20;

lineAnnotation.InteriorColor = new double[] { 1, 0, 1 };
lineAnnotation.CaptionOffset[0] = 20;
lineAnnotation.CaptionOffset[1] = 40;

lineAnnotation.LineEndingStyles[0] = AnnotationLineEndingStyle.OpenArrow;
lineAnnotation.LineEndingStyles[1] = AnnotationLineEndingStyle.ClosedArrow;

lineAnnotation.Intent = IntentStyle.LineArrow;
lineAnnotation.Color = new double[] { 0, 1, 0 };
page.Annotations.Add( lineAnnotation );
See Also

Reference