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.
Properties
Representing an opaque object, there is no exposed property.
Methods
There is no inherited method.
CanvasPattern.setTransform()
- Applies an
SVGMatrix
representing a linear transform to the pattern.
Specifications
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'CanvasPattern' in that specification. |
Living Standard | Added setTransform() method in v5. |
Browser compatibility
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic support | 4 | ? | 3.6 | 9 | 9 | 3.1 |
setTransform | No | ? | 33 | ? | 9 | 3.1 |
Feature | Android webview | Chrome for Android | Edge mobile | Firefox for Android | Opera Android | iOS Safari | Samsung Internet |
---|---|---|---|---|---|---|---|
Basic support | ? | 2.1 | ? | 4 | 10.0 | 3.2 | Yes |
setTransform | ? | ? | ? | 33 | ? | ? | No |
See also
CanvasRenderingContext2D.createPattern()
- The
<canvas>
element and its associated interface,HTMLCanvasElement