Re: CR: HTML Canvas 2D Context

http://www.w3.org/TR/2015/CR-2dcontext-20150702/

>     If the number of elements in a is odd, then let a be the concatentation [sic] of two copies of a.

>  Linear gradients and solid colors always define all points even with singular tranformation [sic] matrices.

> nor any additional contraints, [sic]

>  void arc(unrestricted double x, unrestricted double y, unrestricted double radius, unrestricted double startAngle, unrestricted double endAngle, optional boolean anticlockwise = false);

w3 is en-us, I understand that whatwg's html editor isn't, but...
anticlockwise [About 1,050,000 results] should really be
counterclockwise [About 11,400,000 results]

here, the shortest variants are first:
>  void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy);
>  void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);
>  void drawImage((HTMLImageElement or HTMLCanvasElement or HTMLVideoElement) image, unrestricted double sx, unrestricted double sy, unrestricted double sw, unrestricted double sh, unrestricted double dx, unrestricted double dy, unrestricted double dw, unrestricted double dh);

here, the longest is first:
>  void putImageData(ImageData imagedata, double dx, double dy, double dirtyX, double dirtyY, double dirtyWidth, double dirtyHeight);
>  void putImageData(ImageData imagedata, double dx, double dy);

any reason?

> particular case (e.g. because the element is not in a Document), then the "computed value of the 'color' property" for the purposes of determining the computed value of
> the currentColor keyword is fully opaque black. [CSSCOLOR]

the underline from `in a Document` runs over the next line in
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:39.0) Gecko/20100101
Firefox/39.0

> context . lineDashOffset
...
> Can be set, to change the phase offset. Values that are not finite values are ignored.

shouldn't this have [= value] ?

> On setting, if the new value is one of the literal strings butt, round, and square, then the current value must be changed to the new value; other values must ignored, leaving the value unchanged.

must ignored => must be ignored

> Cut the line on which end finds itself short at end and place a point there, cutting the subpath that it was in in two;

`in in` while technically correct is painful to read

i think it's possible to write `cutting its containing subpath in two`

> Jump to the first appropriate step:

I expected an actual `jump` somewhere in here, there wasn't. even more
confusingly, only the first of three items said `continue to the next
step`, which implied to me that the other two didn't `continue to the
next step`, i couldn't figure where i should jump to from them.

> Return to the step labeled dash on.

I'm used to `return` for subroutines, but this isn't. I'd expect
`Jump` or `Go` instead.

> The round value means that a semi-circle with the diameter equal to the styles lineWidth width must additionally be placed on to the line coming out of each point.

on to => onto

> Points with no lines coming out of them must have two caps placed back-to-back as if it was really two points connected to each other by an infinitesimally short straight line in the direction of the point's directionality (as defined above).

it => each || it was => they [each?] were
(because the active article is `points` plural and not singular;
alternatively Points => Each point ; but then you have to do something
about `out of them`)

> Let the anchor point's vertical position be half way between the bottom and the top of the em box of the first available font of the inline box.

halfway

> context . arcTo(x1, y1, x2, y2, radius)
> Adds an arc with the given control points and radius to the current subpath, connected to the previous point by a straight line.
> Throws an IndexSizeError exception if the given radius is negative.

there's an empty white box here....

> 4 Text styles
> context . font [ = value ]

 dl.domintro:before { display: table; margin: -1em -0.5em -0.5em auto;
width: auto; content: 'This definition is non-normative.
Implementation requirements are given below this definition.'; color:
#606060; border:1px solid lightgray; background: white; padding: 0
0.25em;font-size:.9em;}

This doesn't work well for small windows.

> context . bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
> Adds the given point to the current subpath, connected to the previous one by a cubic Bézier curve with the given control points.

> context . arcTo(x1, y1, x2, y2, radius)
> Adds an arc with the given control points and radius to the current subpath, connected to the previous point by a straight line.

shouldn't these be cp1x cp1y cp2x cp2y?

General request:
Please change from Sentence. [CITATION] Sentence. to: Sentence
[CITATION]. Sentence.
It's really painful to read the former, as in:
> On setting, strings must be parsed as CSS <color> values and the color assigned, and CanvasGradient and CanvasPattern objects must be assigned themselves. [CSSCOLOR] If the value is a string but cannot be parsed as a CSS <color> value, or is neither a string, a CanvasGradient, nor a CanvasPattern, then it must be ignored, and the attribute must retain its previous value.

> Check the usability of the image argument. If this returns aborted, then an exception has been thrown and the method doesn't return anything; abort these steps.

what method does `and the method doesn't return anything` refer to,
and what is doing the `return`ing? what does `createPattern(...)`
return for this case?

> If it returns bad, then return null and abort these steps.

Note that here `createPattern(...)` clearly returned `null` before
aborting the steps.

> Modifying this image after calling the createPattern() method must not affect the pattern.

change `this image` to the stylized `image` (italic, grey background)?
["this image" doesn't tightly reference something here.]

> Clear the pixels in pixels to a fully transparent black, erasing any previous image.

Does that mean something different than:

`Clear the pixels in pixels to fully transparent black, erasing any
previous image.`
?

> If the sx, sy, sw, and sh arguments are omitted, they must default to 0, 0, the image's intrinsic width in image pixels, and the image's intrinsic height in image pixels, respectively.

omitted seems like an odd word. More like `if a version that doesn't
include them`.

> The image argument is an instance of either HTMLImageElement, HTMLCanvasElement, or HTMLVideoElement.

Please omit `either` (see usage note [1])

> Let arguments be the dictionary object provided as the method's argument.

it's confusing to use a plural to refer to a singular thing. I'd
suggest `argument`.

> inform the user of the location of the region representing the control given by the control member's value for this canvas element, if any.

I'm not sure what `user` means. I probably doesn't mean "human", and
it shouldn't mean "user agent", since the UA is doing the work, it
might mean Accessibility Agent.

> When the removeHitRegion() method is invoked, the user agent must run the following steps:
> When the clearHitRegions() method is invoked, the user agent must run the following steps:

There's no "inform the user of the removal of the region" step, which
is odd, given the parallel for informing the user when it was added.

> If these steps say to act as normal,

the italics here is nice, it'd be helpful if the same italics carried
through into the steps.

>     for (var y = 1; y < h-1; y += 1) {
...
>           outputData[i] = 127 + -inputData[i - w*4 - 4] -   inputData[i - w*4] - inputData[i - w*4 + 4] +
>                                 -inputData[i - 4]       + 8*inputData[i]       - inputData[i + 4] +

for longer expressions, you include spaces around `-` when you use it
for `subtract` (as opposed to sign negation). Notably, you use `i - 4`
instead of `i-4`. I'd suggest you do the same for the shorter
expressions too.[It looks like you don't include spaces around `*` as
a way to indicate precedence in order of operations.]

> and either the shadowBlur is non-zero, or the shadowOffsetX is non-zero, or the shadowOffsetY is non-zero.

[1] -- I'd suggest `at least one of shadowBlur, shadowOffsetX, or
shadowOffsetY is non-zero`.




[1] http://www.thefreedictionary.com/either

Received on Sunday, 5 July 2015 19:43:24 UTC