Slide 42
Slide 42 text
Create Worklet
class MyPaint {
paint(ctx: CanvasRenderingContext2D) {
ctx.beginPath();
ctx.arc(x, y, outerRadius, 0, Math.PI * 2, false);
ctx.arc(x, y, innerRadius, 0, Math.PI * 2, true);
ctx.fill();
}
}
registerPaint('my-paint', MyPaint);