aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/imagebitmap
diff options
context:
space:
mode:
authorPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
committerPeter Bengtsson <mail@peterbe.com>2020-12-08 14:40:17 -0500
commit33058f2b292b3a581333bdfb21b8f671898c5060 (patch)
tree51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/imagebitmap
parent8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff)
downloadtranslated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2
translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip
initial commit
Diffstat (limited to 'files/zh-cn/web/api/imagebitmap')
-rw-r--r--files/zh-cn/web/api/imagebitmap/height/index.html33
-rw-r--r--files/zh-cn/web/api/imagebitmap/index.html132
-rw-r--r--files/zh-cn/web/api/imagebitmap/width/index.html33
3 files changed, 198 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/imagebitmap/height/index.html b/files/zh-cn/web/api/imagebitmap/height/index.html
new file mode 100644
index 0000000000..b6e6560cfb
--- /dev/null
+++ b/files/zh-cn/web/api/imagebitmap/height/index.html
@@ -0,0 +1,33 @@
+---
+title: ImageBitmap.height
+slug: Web/API/ImageBitmap/height
+translation_of: Web/API/ImageBitmap/height
+---
+<div>{{APIRef("Canvas API")}}</div>
+
+<div> </div>
+
+<p><code><strong>只读属性 ImageBitmap.height</strong></code> 返回 {{domxref("ImageBitmap")}} 对象的 CSS 像素高度。</p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "webappapis.html#dom-imagebitmap-height", "ImageBitmap.height")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.ImageBitmap.height")}}</p>
diff --git a/files/zh-cn/web/api/imagebitmap/index.html b/files/zh-cn/web/api/imagebitmap/index.html
new file mode 100644
index 0000000000..79e789620b
--- /dev/null
+++ b/files/zh-cn/web/api/imagebitmap/index.html
@@ -0,0 +1,132 @@
+---
+title: ImageBitmap
+slug: Web/API/ImageBitmap
+tags:
+ - API
+ - Canvas
+ - ImageBitmap
+ - Interface
+ - 绘图
+translation_of: Web/API/ImageBitmap
+---
+<div>{{APIRef("Canvas API")}}</div>
+
+<p><code><strong>ImageBitmap</strong></code> 接口表示能够被绘制到 {{HTMLElement("canvas")}} 上的位图图像,具有低延迟的特性。运用 {{domxref("ImageBitmapFactories.createImageBitmap", "createImageBitmap()")}} 工厂方法模式,它可以从多种源中生成。 <code>ImageBitmap</code>提供了一种异步且高资源利用率的方式来为WebGL的渲染准备基础结构。</p>
+
+<h2 id="属性">属性</h2>
+
+<dl>
+ <dt>{{domxref("ImageBitmap.height")}} {{readonlyInline}}</dt>
+ <dd>无符号长整型数值,表示ImageData的CSS像素单位的高度。</dd>
+ <dt>{{domxref("ImageBitmap.width")}} {{readonlyInline}}</dt>
+ <dd>无符号长整型数值, 表示ImageData的CSS像素单位的宽度。</dd>
+</dl>
+
+<h2 id="方法">方法</h2>
+
+<dl>
+ <dt>{{domxref("ImageBitmap.close()")}}</dt>
+ <dd>
+ <p>释放ImageBitmap所相关联的所有图形资源。</p>
+ </dd>
+</dl>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <thead>
+ <tr>
+ <th scope="col">Specification</th>
+ <th scope="col">Status</th>
+ <th scope="col">Comment</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "webappapis.html#imagebitmap", "ImageBitmap")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td> </td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+<p>{{CompatibilityTable}}</p>
+
+<div id="compat-desktop">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Chrome</th>
+ <th>Firefox (Gecko)</th>
+ <th>Internet Explorer</th>
+ <th>Opera</th>
+ <th>Safari</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoDesktop(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>close()</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop(46)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<div id="compat-mobile">
+<table class="compat-table">
+ <tbody>
+ <tr>
+ <th>Feature</th>
+ <th>Android</th>
+ <th>Android Webview</th>
+ <th>Firefox Mobile (Gecko)</th>
+ <th>IE Mobile</th>
+ <th>Opera Mobile</th>
+ <th>Safari Mobile</th>
+ <th>Chrome for Android</th>
+ </tr>
+ <tr>
+ <td>Basic support</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ <td>{{CompatGeckoMobile(42)}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatUnknown}}</td>
+ <td>{{CompatVersionUnknown}}</td>
+ </tr>
+ <tr>
+ <td><code>close()</code></td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatGeckoDesktop(46)}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ <td>{{CompatNo}}</td>
+ </tr>
+ </tbody>
+</table>
+</div>
+
+<h2 id="另见">另见</h2>
+
+<ul>
+ <li>{{domxref("ImageBitmapFactories.createImageBitmap()")}}</li>
+ <li>{{domxref("CanvasRenderingContext2D.drawImage()")}}</li>
+ <li>{{domxref("WebGLRenderingContext.texImage2D()")}}</li>
+ <li>{{domxref("OffScreenCanvas.transferToImageBitmap()")}}</li>
+</ul>
diff --git a/files/zh-cn/web/api/imagebitmap/width/index.html b/files/zh-cn/web/api/imagebitmap/width/index.html
new file mode 100644
index 0000000000..14bbd1882f
--- /dev/null
+++ b/files/zh-cn/web/api/imagebitmap/width/index.html
@@ -0,0 +1,33 @@
+---
+title: ImageBitmap.width
+slug: Web/API/ImageBitmap/width
+translation_of: Web/API/ImageBitmap/width
+---
+<div>{{APIRef("Canvas API")}}</div>
+
+<div> </div>
+
+<p>只读属性 <code><strong>ImageBitmap.width</strong></code> 返回 {{domxref("ImageBitmap")}} 对象的 CSS 像素宽度。</p>
+
+<h2 id="规范">规范</h2>
+
+<table class="standard-table">
+ <tbody>
+ <tr>
+ <th scope="col">规范</th>
+ <th scope="col">状态</th>
+ <th scope="col">备注</th>
+ </tr>
+ <tr>
+ <td>{{SpecName('HTML WHATWG', "webappapis.html#dom-imagebitmap-width", "ImageBitmap.height")}}</td>
+ <td>{{Spec2('HTML WHATWG')}}</td>
+ <td>Initial definition.</td>
+ </tr>
+ </tbody>
+</table>
+
+<h2 id="浏览器兼容性">浏览器兼容性</h2>
+
+
+
+<p>{{Compat("api.ImageBitmap.width")}}</p>