Typst Fumadocs

Polygon

Documentation for the `polygon` function.

A closed polygon.

The polygon is defined by its corner points and is closed automatically.

Example

Loading compiler...
#polygon(
  fill: none | color | gradient | tiling,
  fill-rule: str,
  stroke: none | auto | length | color | gradient | stroke | tiling | dictionary,
  vertices
) -> content

Parameters

Prop

Type

Definitions

A regular polygon, defined by its size and number of vertices.

Loading compiler...
#polygon.regular(
  fill: none | color | gradient | tiling,
  stroke: none | auto | length | color | gradient | stroke | tiling | dictionary,
  size: length,
  vertices: int
) -> content

Parameters

Prop

Type

On this page