class HexaPDF::Type::Annotations::Polygon

Parent

A polygon annotation displays a closed polygon inside the annotation rectangle.

Also see PolygonPolyline for more information.

Example:

doc.annotations.create_polygon(doc.pages[0], 20, 20, 30, 70, 80, 60, 40, 30).
  border_style(color: "hp-blue", width: 2, style: [3, 1]).
  interior_color("hp-orange").
  regenerate_appearance

See: PDF2.0 s12.5.6.9, HexaPDF::Type::Annotations::PolygonPolyline