CanvasPattern.setTransform does not support DOMMatrix
Categories
(Core :: Graphics: Canvas2D, defect, P3)
Tracking
()
People
(Reporter: saschanaz, Assigned: longsonr)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
// Assuming `$0` refers to a valid HTMLImageElement
document.createElement("canvas").getContext("2d").createPattern($0, "no-repeat").setTransform(new DOMMatrix());
Currently this code throws: TypeError: Argument 1 of CanvasPattern.setTransform does not implement interface SVGMatrix.
Relevant spec: https://html.spec.whatwg.org/multipage/canvas.html#2dcontext:dom-canvaspattern-settransform
Updated•5 years ago
|
Updated•5 years ago
|
Reporter | ||
Comment 2•5 years ago
|
||
Chrome supports it. Example: https://codepen.io/SaschaNaz/pen/zVgjrM
Reporter | ||
Comment 4•5 years ago
|
||
Confirmed that it also works on WK, tested on epiphany-browser.
Assignee | ||
Comment 5•4 years ago
|
||
Assignee | ||
Comment 6•4 years ago
|
||
I'm stuck trying to create the new tests
./build.sh
Traceback (most recent call last):
File "gentest.py", line 1, in <module>
from gentestutils import genTestUtils
File "/moz2/mozilla-central/testing/web-platform/tests/html/canvas/tools/gentestutils.py", line 47, in <module>
import cairocffi as cairo
File "/moz2/mozilla-central/testing/web-platform/tests/html/canvas/tools/.virtualenv/lib/python2.7/site-packages/cairocffi/init.py", line 41, in <module>
cairo = dlopen(ffi, 'cairo', 'cairo-2', 'cairo-gobject-2')
File "/moz2/mozilla-central/testing/web-platform/tests/html/canvas/tools/.virtualenv/lib/python2.7/site-packages/cairocffi/init.py", line 38, in dlopen
raise OSError("dlopen() failed to load a library: %s" % ' / '.join(names))
OSError: dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2
Comment 7•4 years ago
|
||
I am not really familiar with the WPT test setup as I've not messed with it much at all. Probably better to ping someone more familiar with the WPT tooling. Emilio, ideas about who might have suitable knowledge to help here?
Comment 8•4 years ago
|
||
James, Sam, is any of you familiar with the build setup for the canvas tests?
Though off-hand it seems you may need cairo installed or something on your machine.
Assignee | ||
Comment 9•4 years ago
|
||
Fixed things via
brew install cairo
Thank you.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 10•4 years ago
|
||
Assignee | ||
Comment 11•4 years ago
|
||
Did you want to review this or are you happy with emilio's review alone?
Updated•4 years ago
|
Comment 12•4 years ago
|
||
Comment 15•4 years ago
|
||
bugherder |
Updated•4 years ago
|
Updated•4 years ago
|
Comment 17•4 years ago
•
|
||
I've finished the documentation for this; see https://github.com/mdn/sprints/issues/3424#issuecomment-652956306 for full details.
Description
•