Usage

Draw an open sequence of segments.

This type is used by Polyline

tsx
// Draw an open sequence of segments.
import { Drawing, Polyline } from 'kuito';

<Drawing label="Plays this week" viewBox={[0, 0, 60, 20]} width={120} height={40}>
  <Polyline
    points={[
      [0, 17],
      [10, 12],
      [20, 15],
      [30, 8],
      [40, 11],
      [50, 5],
      [60, 9],
    ]}
    fill="none"
    stroke="#e5484d"
    strokeWidth={1.5}
    strokeLinejoin="round"
  />
</Drawing>;

Type declaration

ts
export interface PolylineProps extends ShapePaint {
  points: readonly (readonly [number, number])[];
}

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.