Utilisation

Draw an open sequence of segments.

Ce type est utilisé par 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>;

Déclaration du type

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

Membres 15

NomTypeRequisDescription
pointsreadonly (readonly [number, number])[]Oui—
fillstringNonA hex color, or none; black by default.
fillRuleFillRuleNon—
strokestringNonA hex color, or none, the default.
strokeWidthnumberNonIn user units; 1 by default.
strokeLinecapStrokeLinecapNon—
strokeLinejoinStrokeLinejoinNon—
strokeMiterlimitnumberNon—
strokeDasharrayreadonly number[]NonDash and gap lengths in user units, repeated.
strokeDashoffsetnumberNon—
opacitynumberNonMultiplies with its Groups' opacity.
translateXnumberNonIn user units, then rotate in degrees and scale, about the origin.
translateYnumberNon—
scalenumberNon—
rotatenumberNon—
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.