您正位於 MDN Web Docs 的可編輯版本

以 MDN Web Docs 使用者身分檢視: https://developer.mozilla.org/zh-TW/docs/Web/API/CanvasPattern

我們的志工尚未將本文翻譯為 正體中文 (繁體) 版本。加入我們,幫忙翻譯!
您也可以閱讀本文的 English (US) 版本。

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.

Properties

As an opaque object, this has no exposed property.

Methods

There are no inherited method.

CanvasPattern.setTransform()
Applies an SVGMatrix or DOMMatrix 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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CanvasPatternChrome Full support 4Edge Full support 12Firefox Full support 3.6IE Full support 9Opera Full support 9Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3.2Samsung Internet Android Full support 1.0
setTransformChrome Full support 68Edge Full support 79Firefox Full support 33IE No support NoOpera Full support 9Safari Full support 11.1WebView Android Full support 68Chrome Android Full support 68Firefox Android Full support 33Opera Android Full support 10.1Safari iOS Full support 11Samsung Internet Android Full support 10.0

Legend

Full support  
Full support
No support  
No support

See also

文件標籤與貢獻者

最近更新: chrisdavidmills,