Usage

Draw a closed shape.

This type is used by Polygon

tsx
// 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

ts
export interface PolygonProps extends PolylineProps {}

Members 15

NameTypeRequiredDescription
pointsreadonly (readonly [number, number])[]Yes—
fillstringNoA hex color, or none; black by default.
fillRuleFillRuleNo—
strokestringNoA hex color, or none, the default.
strokeWidthnumberNoIn user units; 1 by default.
strokeLinecapStrokeLinecapNo—
strokeLinejoinStrokeLinejoinNo—
strokeMiterlimitnumberNo—
strokeDasharrayreadonly number[]NoDash and gap lengths in user units, repeated.
strokeDashoffsetnumberNo—
opacitynumberNoMultiplies with its Groups' opacity.
translateXnumberNoIn user units, then rotate in degrees and scale, about the origin.
translateYnumberNo—
scalenumberNo—
rotatenumberNo—
Generated from the public TypeScript declarations: signatures, props and defaults come from the checked source, descriptions from its JSDoc. No defaults are invented.