Help us test MDN's new front-end: https://discourse.mozilla.org/t/help-us-test-mdns-new-react-front-end-beta/42593

Relawan kami belum menerjemahkan artikel ini ke bahasa Bahasa Indonesia. Bergabunglah dan bantu kami menyelesaikannya!
Anda juga dapat membaca artikel ini dalam 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 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 AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
CanvasPatternChrome Full support 4Edge Full support YesFirefox Full support 3.6IE Full support 9Opera Full support 9Safari Full support 3.1WebView Android Full support YesChrome Android Full support 18Edge Mobile ? Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 3.2Samsung Internet Android Full support Yes
setTransform
ExperimentalNon-standard
Chrome Full support 68Edge No support NoFirefox Full support 33IE No support NoOpera Full support 9Safari Full support 3.1WebView Android Full support 68Chrome Android Full support 68Edge Mobile No support NoFirefox Android Full support 33Opera Android Full support 10.1Safari iOS Full support 11Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
Experimental. Expect behavior to change in the future.
Experimental. Expect behavior to change in the future.
Non-standard. Expect poor cross-browser support.
Non-standard. Expect poor cross-browser support.

See also

Tag Dokumen dan Kontributor

Terakhir diperbarui oleh: mdnwebdocs-bot,