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
The paint API specifies that the width and height fields of PaintInfo are doubles, but
elsewhere in the spec (https://drafts.css-houdini.org/css-paint-api/#2d-rendering-context)
says to "Set bitmap dimensions for the context’s output bitmap to width and height", which
implies that the width and height are integers.
Instead, I suggest that phrase should be changed to "Set bitmap dimensions for the context’s output bitmap to the rounded values of width and height".
(Note: the actual device-pixel backing buffer may have a different size than the output bitmap. This
is accounted for by devicePixelRatio.)
The text was updated successfully, but these errors were encountered:
Also, an un-rounded width and height plus devicePixelRatio and specifying the top-left
of the painting canvas to be positioned at the device pixel location of the top-left of where
the element will actually be drawn to the screen, allows the developer, if they wish, to do pixel-perfect painting.
This is why it's important for width and height to be doubles.
The paint API specifies that the width and height fields of PaintInfo are doubles, but
elsewhere in the spec (https://drafts.css-houdini.org/css-paint-api/#2d-rendering-context)
says to "Set bitmap dimensions for the context’s output bitmap to width and height", which
implies that the width and height are integers.
Instead, I suggest that phrase should be changed to "Set bitmap dimensions for the context’s output bitmap to the rounded values of width and height".
(Note: the actual device-pixel backing buffer may have a different size than the output bitmap. This
is accounted for by devicePixelRatio.)
The text was updated successfully, but these errors were encountered: