RectangleProps
Props of Rectangle: its box in user units, corner radii and paint.
Verwendung
Draw a rectangle.
Dieser Typ wird verwendet von 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>;Typdeklaration
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;
}Mitglieder 20
| Name | Typ | Erforderlich | Beschreibung |
|---|---|---|---|
x | number | Nein | — |
y | number | Nein | — |
width | number | Ja | — |
height | number | Ja | — |
rx | number | Nein | Corner radii; each defaults to the other, as SVG's do. |
ry | number | Nein | — |
fill | string | Nein | A hex color, or none; black by default. |
fillRule | FillRule | Nein | — |
stroke | string | Nein | A hex color, or none, the default. |
strokeWidth | number | Nein | In user units; 1 by default. |
strokeLinecap | StrokeLinecap | Nein | — |
strokeLinejoin | StrokeLinejoin | Nein | — |
strokeMiterlimit | number | Nein | — |
strokeDasharray | readonly number[] | Nein | Dash and gap lengths in user units, repeated. |
strokeDashoffset | number | Nein | — |
opacity | number | Nein | Multiplies with its Groups' opacity. |
translateX | number | Nein | In user units, then rotate in degrees and scale, about the origin. |
translateY | number | Nein | — |
scale | number | Nein | — |
rotate | number | Nein | — |
Generiert aus den öffentlichen TypeScript-Deklarationen: Signaturen, Props und Standardwerte stammen aus der geprüften Quelle, Beschreibungen aus deren JSDoc. Kein Standardwert ist erfunden.