I want to use
variant createPattern(Image image, string repetition), but I don't know how to pass the image parameter. I tried to pass the id of an Image but the function returns an empty object.
variant createPattern(color color, enumeration patternMode) works like a charm.
createPatternworks only with string url, likevar ptrn = ctx.createPattern("https://mdn.mozillademos.org/files/222/Canvas_createpattern.png", "repeat");all other options (Image, CanvasImageData etc.) do nothing. Looks like a bug. - folibis