RectangleProps
Props of Rectangle: its box in user units, corner radii and paint.
Utilisation
Draw a rectangle.
Ce type est utilisé par Rectangle
// 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
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
| Nom | Type | Requis | Description |
|---|---|---|---|
x | number | Non | — |
y | number | Non | — |
width | number | Oui | — |
height | number | Oui | — |
rx | number | Non | Corner radii; each defaults to the other, as SVG's do. |
ry | number | Non | — |
fill | string | Non | A hex color, or none; black by default. |
fillRule | FillRule | Non | — |
stroke | string | Non | A hex color, or none, the default. |
strokeWidth | number | Non | In user units; 1 by default. |
strokeLinecap | StrokeLinecap | Non | — |
strokeLinejoin | StrokeLinejoin | Non | — |
strokeMiterlimit | number | Non | — |
strokeDasharray | readonly number[] | Non | Dash and gap lengths in user units, repeated. |
strokeDashoffset | number | Non | — |
opacity | number | Non | Multiplies with its Groups' opacity. |
translateX | number | Non | In user units, then rotate in degrees and scale, about the origin. |
translateY | number | Non | — |
scale | number | Non | — |
rotate | number | Non | — |
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.