The CanvasPattern
interface represents an opaque object describing a pattern, based on an image, a canvas, or a video, created by the CanvasRenderingContext2D.createPattern()
method.
It can be used as a fillStyle
or strokeStyle
.
As an opaque object, this has no exposed property.
There are no inherited method.
CanvasPattern.setTransform()
SVGMatrix
representing a linear transform to the pattern.Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'CanvasPattern' in that specification. | Living Standard | Added setTransform() method in v5. |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 4 | ? | 3.6 | 9 | 9 | 3.1 |
setTransform
|
No | ? | 33 | ? | 9 | 3.1 |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? | 18 | ? | 4 | 10.0 | 3.2 | Yes |
setTransform
|
? | ? | ? | 33 | ? | ? | No |
CanvasRenderingContext2D.createPattern()
<canvas>
element and its associated interface, HTMLCanvasElement
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/CanvasPattern