Function: cssPolygon()
ts
function cssPolygon(
poly,
box,
precision?,
holes?
): string;polygon(...) for poly, expressed as percentages of box. With holes, it's an even–odd polygon that visits each hole from the outline's first point and comes back, so the connecting lines cancel out.
Parameters
| Parameter | Type | Default value |
|---|---|---|
poly | Polygon | undefined |
box | Rect | undefined |
precision | number | 4 |
holes | Polygon[] | [] |
Returns
string