LineAnnotation

Overview

LineAnnotation is a type in Aspose.PDF FOSS for Go. Inherits from: drawingAnnotationBase.

LineAnnotation draws a straight line between two points, with optional line endings on each end (arrows, circles, etc.

This type declares 15 methods for LineAnnotation objects in Go programs. Available methods include: AnnotationType, End, EndLineEnding, InteriorColor, LeaderLineLength, RegenerateAppearance, SetBorderWidth, SetEnd, SetEndLineEnding, SetInteriorColor, SetLeaderLineLength, SetStart, and 3 additional methods. Public members are accessible to any Go application after installing the Aspose.PDF FOSS for Go package.

Methods

SignatureDescription
AnnotationType() → AnnotationTypeReturns the annotation type.
Start() → PointStart returns the line’s start point.
End() → PointEnd returns the line’s end point.
SetStart(p: Point)SetStart updates the line’s start point and recomputes /Rect.
SetEnd(p: Point)SetEnd updates the line’s end point and recomputes /Rect.
SetBorderWidth(w: float64)SetBorderWidth overrides drawingAnnotationBase.SetBorderWidth so /Rect (which depends on BorderWidth via line-ending padding) is recomputed before /AP/N regenerates — ensuring the appearance stream’s /BBox matches the new bounds in a single pass.
RegenerateAppearance()RegenerateAppearance forces /AP/N to be rebuilt from current properties.
StartLineEnding() → LineEndingStyleStartLineEnding returns the style applied to the start of the line.
EndLineEnding() → LineEndingStyleEndLineEnding returns the style applied to the end of the line.
SetStartLineEnding(s: LineEndingStyle)SetStartLineEnding sets the start-side line-ending style.
SetEndLineEnding(s: LineEndingStyle)SetEndLineEnding sets the end-side line-ending style.
InteriorColor() → *ColorInteriorColor returns the /IC fill color (used for filled line endings: ClosedArrow, RClosedArrow, Square, Circle, Diamond).
SetInteriorColor(c: *Color)SetInteriorColor writes /IC as an RGB array; nil removes the entry.
LeaderLineLength() → float64LeaderLineLength returns the /LL value (0 if absent).
SetLeaderLineLength(l: float64)SetLeaderLineLength writes /LL.

See Also

 English