You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: specs/latest/2.0/index.html
+5-4Lines changed: 5 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -268,8 +268,8 @@ <h3>Types</h3>
268
268
typedef unsigned long long GLuint64;
269
269
270
270
dictionary WebGLCopyElementImageConfig {
271
-
GLfloat sx = 0;
272
-
GLfloat sy = 0;
271
+
GLfloat sx;
272
+
GLfloat sy;
273
273
GLfloat swidth;
274
274
GLfloat sheight;
275
275
GLsizei width;
@@ -2234,8 +2234,8 @@ <h4>Texture objects</h4>
2234
2234
<p>If <code>target</code> is not <code>TEXTURE_2D</code>, generates an <code>INVALID_ENUM</code> error.</p>
2235
2235
<p>If no <code>WebGLTexture</code> is bound to <code>target</code>, generates an <code>INVALID_OPERATION</code> error.</p>
2236
2236
<p>If a <code>WebGLBuffer</code> is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2237
-
<p><code>config.sx</code> and <code>config.sy</code> are in CSS pixels and default to 0. <code>config.swidth</code> and <code>config.sheight</code>are in CSS pixels and default to the source's natural width minus <code>config.sx</code> and natural height minus <code>config.sy</code>, respectively. Together, these members define the source rectangle of the element image snapshot to render.</p>
2238
-
<p><code>config.width</code> and <code>config.height</code> are in texels and define the generated texture size. If omitted, each dimension defaults to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot.</p>
2237
+
<p><code>config.sx</code>, <code>config.sy</code>, <code>config.swidth</code>, and <code>config.sheight</code>define the source rectangle of the element image snapshot to render, in CSS pixels. Either all four members must be supplied, or none of them. If none of them are supplied, the source rectangle defaults to the source's natural width and natural height, starting at the origin.</p>
2238
+
<p><code>config.width</code> and <code>config.height</code> are in texels and define the generated texture size. Either both members must be supplied, or neither of them. If neither member is supplied, the texture width and height default to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot.</p>
2239
2239
<p>The <code>internalformat</code> argument must be one of the values in the following table. Each value has an implied source format of <code>RGBA</code> and the listed implied source type:</p>
<p>If <code>internalformat</code> is not listed in the table above, generates an <code>INVALID_ENUM</code> error.</p>
2248
+
<p>If only some of <code>config.sx</code>, <code>config.sy</code>, <code>config.swidth</code>, and <code>config.sheight</code> are supplied, or if only one of <code>config.width</code> and <code>config.height</code> is supplied, generates an <code>INVALID_VALUE</code> error.</p>
2248
2249
<p>If any supplied numeric member of <code>config</code> is negative, or if the computed source rectangle width, source rectangle height, texture width, or texture height is not positive, generates an <code>INVALID_VALUE</code> error.</p>
2249
2250
<p>
2250
2251
If <ahref="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
0 commit comments