Created
April 25, 2022 14:45
-
-
Save colinta/af14aff0efa9af2f3722803e19a9fdca to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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