PdfLineAnnotation constructor
PdfLineAnnotation(
- List<
int> linePoints, - String text, {
- PdfColor? color,
- PdfColor? innerColor,
- PdfAnnotationBorder? border,
- String? author,
- String? subject,
- DateTime? modifiedDate,
- double? opacity,
- bool? setAppearance,
- PdfLineEndingStyle beginLineStyle = PdfLineEndingStyle.none,
- PdfLineEndingStyle endLineStyle = PdfLineEndingStyle.none,
- PdfLineIntent lineIntent = PdfLineIntent.lineArrow,
- int? leaderLine,
- int? leaderLineExt,
- bool lineCaption = false,
- List<
PdfAnnotationFlags> ? flags,
Initializes new instance of PdfLineAnnotation class.
PdfDocument document = PdfDocument();
PdfPage page = document.pages.add();
List<int> points = <int>[80, 420, 250, 420];
PdfLineAnnotation lineAnnotation = PdfLineAnnotation(
points, 'Line Annotation',
opacity: 0.95,
border: PdfAnnotationBorder(1),
lineIntent: PdfLineIntent.lineDimension,
beginLineStyle: PdfLineEndingStyle.butt,
endLineStyle: PdfLineEndingStyle.none,
innerColor: PdfColor(0, 255, 0),
color: PdfColor(0, 255, 255),
leaderLineExt: 10,
leaderLine: 2,
lineCaption: true,
captionType: PdfLineCaptionType.top);
page.annotations.add(lineAnnotation);
List<int> bytes = await document.save();
document.dispose();
Implementation
PdfLineAnnotation(List<int> linePoints, String text,
{PdfColor? color,
PdfColor? innerColor,
PdfAnnotationBorder? border,
String? author,
String? subject,
DateTime? modifiedDate,
double? opacity,
bool? setAppearance,
PdfLineEndingStyle beginLineStyle = PdfLineEndingStyle.none,
PdfLineEndingStyle endLineStyle = PdfLineEndingStyle.none,
PdfLineCaptionType captionType = PdfLineCaptionType.inline,
PdfLineIntent lineIntent = PdfLineIntent.lineArrow,
int? leaderLine,
int? leaderLineExt,
bool lineCaption = false,
List<PdfAnnotationFlags>? flags}) {
_helper = PdfLineAnnotationHelper(this, linePoints, text,
color: color,
innerColor: innerColor,
border: border,
author: author,
subject: subject,
modifiedDate: modifiedDate,
opacity: opacity,
flags: flags,
setAppearance: setAppearance);
this.beginLineStyle = beginLineStyle;
this.endLineStyle = endLineStyle;
this.captionType = captionType;
this.lineIntent = lineIntent;
this.lineCaption = lineCaption;
if (leaderLine != null) {
this.leaderLine = leaderLine;
}
if (leaderLineExt != null) {
this.leaderLineExt = leaderLineExt;
}
}