此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
CanvasPattern
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2015年7月.
备注: 此特性在Web Worker 中可用。
CanvasPattern 接口表示一个不透明对象,描述了一个基于图像、画布或视频的模板,该模板通过CanvasRenderingContext2D.createPattern() 方法创建。
它可以用作fillStyle 或strokeStyle。
In this article
实例属性
非透明对象,没有暴露的属性。
实例方法
没有继承来的方法。
CanvasPattern.setTransform()应用
DOMMatrix对模板做线性变换
规范
| Specification |
|---|
| HTML> # canvaspattern> |