blob: 0fe68e2fb46251b918cebb007e9f353fc34211a6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
---
title: CanvasPattern
slug: Web/API/CanvasPattern
translation_of: Web/API/CanvasPattern
---
<div>
{{APIRef("Canvas")}}</div>
<p><code><strong>CanvasPattern</strong></code> 接口表示描述一个模板(基于image, canvas或video)的不透明对象,通过 {{domxref("CanvasRenderingContext2D.createPattern()")}} 方法创建.</p>
<h2 id="属性">属性</h2>
<p><em>非透明对象,没有暴露出属性</em></p>
<h2 id="方法">方法</h2>
<p><em>没有继承来的方法</em></p>
<dl>
<dt>
{{domxref("CanvasPattern.setTransform()")}} {{experimental_inline}}</dt>
<dd>
应用 {{domxref("SVGMatrix")}} 对模板做线性变换</dd>
</dl>
<h2 id="Specifications" name="Specifications">标准</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">标准</th>
<th scope="col">状态</th>
<th scope="col">备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{SpecName('HTML WHATWG', "the-canvas-element.html#canvaspattern", "CanvasPattern")}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td>新增 <code>setTransform()</code> 方法</td>
</tr>
<tr>
<td>{{SpecName('HTML Canvas 2D Context W3C', '#canvaspattern', 'CanvasPattern')}}</td>
<td>{{Spec2('HTML Canvas 2D Context W3C')}}</td>
<td>初始定义</td>
</tr>
</tbody>
</table>
<h2 id="浏览器兼容性">浏览器兼容性</h2>
<div>
{{CompatibilityTable}}</div>
<div id="compat-desktop">
<table class="compat-table">
<tbody>
<tr>
<th>功能</th>
<th>Chrome</th>
<th>Firefox (Gecko)</th>
<th>Internet Explorer</th>
<th>Opera</th>
<th>Safari</th>
</tr>
<tr>
<td>基本的支持</td>
<td>4.0</td>
<td>{{CompatGeckoDesktop("1.9.2")}}</td>
<td>9.0</td>
<td>9.0</td>
<td>3.1</td>
</tr>
<tr>
<td><code>setTransform()</code>{{experimental_inline}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatGeckoDesktop("33")}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatNo}}</td>
<td>{{CompatUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<div id="compat-mobile">
<table class="compat-table">
<tbody>
<tr>
<th>功能</th>
<th>Android</th>
<th>Firefox Mobile (Gecko)</th>
<th>IE Mobile</th>
<th>Opera Mobile</th>
<th>Safari Mobile</th>
</tr>
<tr>
<td>基本的支持</td>
<td>2.1</td>
<td>{{CompatGeckoMobile("1.9.2")}}</td>
<td>{{CompatUnknown}}</td>
<td>10.0</td>
<td>3.2</td>
</tr>
<tr>
<td><code>setTransform()</code>{{experimental_inline}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatGeckoMobile("33")}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
<td>{{CompatUnknown}}</td>
</tr>
</tbody>
</table>
</div>
<h2 id="查看相关">查看相关</h2>
<ul>
<li>{{domxref("CanvasRenderingContext2D.createPattern()")}}</li>
<li>{{HTMLElement("canvas")}} 元素及和canvas相关接口 {{domxref("HTMLCanvasElement")}}</li>
</ul>
|