Utilisation

Draw a rectangle.

Ce type est utilisé par Rectangle

tsx
// Draw a rectangle.
import { Drawing, Rectangle } from 'kuito';

<Drawing label="Card" viewBox={[0, 0, 40, 24]} width={80} height={48}>
  <Rectangle x={1} y={1} width={38} height={22} rx={4} fill="#5b5bd6" stroke="#3e3e9f" />
</Drawing>;

Déclaration du type

ts
export interface RectangleProps extends ShapePaint {
  x?: number;
  y?: number;
  width: number;
  height: number;
  /** Corner radii; each defaults to the other, as SVG's do. */
  rx?: number;
  ry?: number;
}

Membres 20

NomTypeRequisDescription
xnumberNon—
ynumberNon—
widthnumberOui—
heightnumberOui—
rxnumberNonCorner radii; each defaults to the other, as SVG's do.
rynumberNon—
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.