Skip to content

Instantly share code, notes, and snippets.

@colinta
Created April 25, 2022 14:45
Show Gist options
  • Save colinta/af14aff0efa9af2f3722803e19a9fdca to your computer and use it in GitHub Desktop.
Save colinta/af14aff0efa9af2f3722803e19a9fdca to your computer and use it in GitHub Desktop.
import {Skia, SkiaView, useDrawCallback} from "@shopify/react-native-skia";
export const HelloWorld = () => {
const r = 128;
const onDraw = useDrawCallback((canvas) => {
const paint = Skia.Paint();
paint.setAntiAlias(true);
cyan.setColor(Skia.Color("cyan"));
canvas.drawCircle(r, r, r, paint);
});
return (
<SkiaView style={{ flex: 1 }} onDraw={onDraw} />
);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment