---
Product: Aspose.PDF
Platform: go
Page Type: reference
Canonical URL: https://reference.aspose.org/pdf/go/lineannotation
---

# 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

| Signature | Description |
|-----------|-------------|
| `AnnotationType()` → `AnnotationType` | Returns the annotation type. |
| `Start()` → `Point` | Start returns the line's start point. |
| `End()` → `Point` | End 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()` → `LineEndingStyle` | StartLineEnding returns the style applied to the start of the line. |
| `EndLineEnding()` → `LineEndingStyle` | EndLineEnding 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()` → `*Color` | InteriorColor 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()` → `float64` | LeaderLineLength returns the /LL value (0 if absent). |
| `SetLeaderLineLength(l: float64)` | SetLeaderLineLength writes /LL. |

## See Also

- [Aspose.PDF — Enterprise API Reference](https://reference.aspose.com/pdf/)