PolygonProps
Props of Polygon: the [x, y] points it closes, and paint.
Usage
Draw a closed shape.
This type is used by Polygon
// Draw a closed shape.
import { Drawing, Polygon } from 'kuito';
<Drawing label="Play" viewBox={[0, 0, 24, 24]} width={24} height={24}>
<Polygon
points={[
[7, 4],
[20, 12],
[7, 20],
]}
fill="#111827"
strokeLinejoin="round"
/>
</Drawing>;Type declaration
export interface PolygonProps extends PolylineProps {}Members 15
| Name | Type | Required | Description |
|---|---|---|---|
points | readonly (readonly [number, number])[] | Yes | — |
fill | string | No | A hex color, or none; black by default. |
fillRule | FillRule | No | — |
stroke | string | No | A hex color, or none, the default. |
strokeWidth | number | No | In user units; 1 by default. |
strokeLinecap | StrokeLinecap | No | — |
strokeLinejoin | StrokeLinejoin | No | — |
strokeMiterlimit | number | No | — |
strokeDasharray | readonly number[] | No | Dash and gap lengths in user units, repeated. |
strokeDashoffset | number | No | — |
opacity | number | No | Multiplies with its Groups' opacity. |
translateX | number | No | In user units, then rotate in degrees and scale, about the origin. |
translateY | number | No | — |
scale | number | No | — |
rotate | number | No | — |
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.