Usage

Draw a separator in a canvas.

This type is used by Line

tsx
// Draw a separator in a canvas.
import { Drawing, Line } from 'kuito';

<Drawing label="Divider" viewBox={[0, 0, 100, 2]} width={200} height={4}>
  <Line x1={0} y1={1} x2={100} y2={1} stroke="#e5e7eb" strokeWidth={2} strokeDasharray={[4, 2]} />
</Drawing>;

Type declaration

ts
export interface LineProps extends ShapePaint {
  x1?: number;
  y1?: number;
  x2?: number;
  y2?: number;
}

Members 18

NameTypeRequiredDescription
x1numberNo—
y1numberNo—
x2numberNo—
y2numberNo—
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.