PdfEllipseAnnotation constructor

PdfEllipseAnnotation(
  1. Rect bounds,
  2. String text, {
  3. PdfColor? color,
  4. PdfColor? innerColor,
  5. PdfAnnotationBorder? border,
  6. String? author,
  7. String? subject,
  8. DateTime? modifiedDate,
  9. double? opacity,
  10. List<PdfAnnotationFlags>? flags,
  11. bool? setAppearance,
})

Initializes new instance of the PdfEllipseAnnotation class.

//Create a  PDF document.
PdfDocument document = PdfDocument();
//Create a  page.
PdfPage page = document.pages.add();
//Create a PDF Ellipse annotation.
PdfEllipseAnnotation ellipseAnnotation = PdfEllipseAnnotation(
    const Rect.fromLTWH(0, 30, 100, 50), 'EllipseAnnotation',
    innerColor: PdfColor(255, 0, 0), color: PdfColor(255, 255, 0));
//Add annotation to the page.
page.annotations.add(ellipseAnnotation);
//Saves the document.
List<int> bytes = await document.save();
document.dispose();

Implementation

PdfEllipseAnnotation(Rect bounds, String text,
    {PdfColor? color,
    PdfColor? innerColor,
    PdfAnnotationBorder? border,
    String? author,
    String? subject,
    DateTime? modifiedDate,
    double? opacity,
    List<PdfAnnotationFlags>? flags,
    bool? setAppearance}) {
  _helper = PdfEllipseAnnotationHelper(this, bounds, text,
      color: color,
      innerColor: innerColor,
      border: border,
      author: author,
      subject: subject,
      modifiedDate: modifiedDate,
      opacity: opacity,
      flags: flags,
      setAppearance: setAppearance);
}