Skip to main content

Ellipses

Circle​

Draws a circle.

NameTypeDescription
cxnumberStart point.
cynumberEnd point.
rnumberRadius.
import {Canvas, Circle} from "@shopify/react-native-skia";

const CircleDemo = () => {
const r = 128;
return (
<Canvas style={{ flex: 1 }}>
<Circle cx={r} cy={r} r={r} color="lightblue" />
</Canvas>
);
};

Circle

Oval​

Draws an oval based on its bounding rectangle.

NameTypeDescription
xnumberX coordinate of the bounding rectangle.
ynumberY coordinate of the bounding rectangle.
widthnumberWidth of the bounding rectangle.
heightnumberHeight of the bounding rectangle.
import {Canvas, Oval} from "@shopify/react-native-skia";

const OvalDemo = () => {
return (
<Canvas style={{ flex: 1 }}>
<Oval x={64} y={0} width={128} height={256} color="lightblue" />
</Canvas>
);
};

Oval