CanvasPattern
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
备注: 此特性在 Web Worker 中可用。
CanvasPattern
接口表示一个不透明对象,描述了一个基于图像、画布或视频的模板,该模板通过 CanvasRenderingContext2D.createPattern()
方法创建。
它可以用作 fillStyle
或 strokeStyle
。
实例属性
非透明对象,没有暴露的属性。
实例方法
没有继承来的方法。
CanvasPattern.setTransform()
-
应用
DOMMatrix
对模板做线性变换
规范
Specification |
---|
HTML # canvaspattern |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
CanvasPattern | ||||||||||||
setTransform | ||||||||||||
Accepts a DOMMatrix2DInit -like object parameter |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
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.