pdftools_toolbox.pdf.annotations.polygon_annotation

Classes

PolygonAnnotation(handle)

A polygon annotation

class pdftools_toolbox.pdf.annotations.polygon_annotation.PolygonAnnotation(handle)[source]

Bases: DrawingAnnotation

A polygon annotation

static create(target_document: Document, path: Path, stroke: Stroke | None, fill: Paint | None) PolygonAnnotation[source]

Create a polygon annotation.

The returned polygon annotation is not yet part of any page. It can be added to a page’s list of annotations.

Parameters:
Returns:

The newly created polygon annotation.

Return type:

pdftools_toolbox.pdf.annotations.polygon_annotation.PolygonAnnotation

Raises:
property fill: Paint

The filling paint

Returns:

pdftools_toolbox.pdf.content.paint.Paint

Raises:

StateError – if the object has already been closed