-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
Can this package be used with a canvas that comes from a createCanvas()
call of the canvas npm module?
When I try to use it as
import { Canvas, CanvasRenderingContext2D, createCanvas } from 'canvas';
import 'path2d-polyfill';
const canvasElement: Canvas = createCanvas(500, 500);
const context: CanvasRenderingContext2D = canvasElement.getContext('2d');
context.fill(new Path2D("M 80 80 A 45 45 0 0 0 125 125 L 125 80 Z"));
I get ReferenceError: Path2D is not defined
Thank you
Metadata
Metadata
Assignees
Labels
No labels