PdfPolygonAnnotation constructor
PdfPolygonAnnotation(})
Initializes new instance of the PdfPolygonAnnotation class.
PdfDocument document = PdfDocument();
PdfPage page = document.pages.add();
List<int> polypoints = <int>[
50,
298,
100,
325,
200,
355,
300,
230,
180,
230
];
PdfPolygonAnnotation polygonAnnotation =
PdfPolygonAnnotation(polypoints, 'PolygonAnnotation');
polygonAnnotation.color = PdfColor(255, 0, 0);
polygonAnnotation.innerColor = PdfColor(255, 0, 255);
page.annotations.add(polygonAnnotation);
List<int> bytes = await document.save();
document.dispose();
Implementation
PdfPolygonAnnotation(List<int> points, String text,
{PdfColor? color,
PdfColor? innerColor,
PdfAnnotationBorder? border,
String? author,
String? subject,
DateTime? modifiedDate,
double? opacity,
List<PdfAnnotationFlags>? flags,
bool? setAppearance}) {
_helper = PdfPolygonAnnotationHelper(this, points, text,
color: color,
innerColor: innerColor,
border: border,
author: author,
subject: subject,
modifiedDate: modifiedDate,
opacity: opacity,
flags: flags,
setAppearance: setAppearance);
}