Circle
Draws a circle at a given center point with a specified radius.Props
X-coordinate of the circle center
Y-coordinate of the circle center
Radius of the circle
Fill or stroke color
Rect
Draws a rectangle.Props
X-coordinate of the top-left corner
Y-coordinate of the top-left corner
Width of the rectangle
Height of the rectangle
Fill or stroke color
RoundedRect
Draws a rectangle with rounded corners.Props
X-coordinate of the top-left corner
Y-coordinate of the top-left corner
Width of the rectangle
Height of the rectangle
Border radius (applies to all corners equally)
Horizontal border radius
Vertical border radius
Oval
Draws an ellipse bounded by a rectangle.Props
X-coordinate of the bounding rectangle
Y-coordinate of the bounding rectangle
Width of the bounding rectangle
Height of the bounding rectangle
Line
Draws a straight line between two points.Props
Starting point of the line
{ x: number, y: number }Ending point of the line
{ x: number, y: number }Line color
Width of the line
Path
Draws a complex path using SVG-like path commands or a Skia path object.Props
The path to draw. Can be:
- SVG path string (e.g., “M 0 0 L 100 100”)
- SkPath object created with
Skia.Path.Make()
Start trim position (0-1)
End trim position (0-1)
Stroke configuration for converting the path to a stroked path
Fill rule:
Winding, EvenOdd, InverseWinding, or InverseEvenOddPoints
Draws a set of points.Props
Array of points to draw
Drawing mode:
points: Draw individual pointslines: Draw lines between pairs of pointspolygon: Draw connected line segments
Box
Draws a box (rectangle or rounded rectangle).Props
Rectangle or rounded rectangle to draw
DiffRect
Draws the difference between two rectangles (creates a “frame” effect).Props
Outer rounded rectangle
Inner rounded rectangle (will be subtracted from outer)
Fill
Fills the entire canvas with a color.Props
Color to fill the canvas
Common Paint Props
All shape components accept these common paint properties:Color of the shape (hex, rgb, rgba, or named color)
Opacity from 0 (transparent) to 1 (opaque)
Whether to fill or stroke the shape
Width of the stroke (when style is ‘stroke’)
Cap style for line ends
Join style for corners
Blend mode for compositing
Enable anti-aliasing