[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] How to unambiguously set canvas pixel size to be pixel-perfect?

On 6/11/14, 5:34 AM, Kirill Prazdnikov wrote:
All page layout (almost all except one method) operates with integer

Not internally in browsers.

What browser does:
HTML.element.x = Math.round(Layout.x(y) / devicePixelRatio);

No modern browser does this internally, I believe.

Unfortunately, this is a fundamental HTML API issue. In perfect world
all HTML elements layout API sould be in double precision.

getBoundingClientRect, getClientRects, and getBoxQuads return unrounded (or rather rounded to the browser's internal layout precision, not to integer CSS pixels) coordinates.


----------------------------------------------------------- You are currently subscribed to public_webgl@khronos.org. To unsubscribe, send an email to majordomo@khronos.org with the following command in the body of your email: unsubscribe public_webgl -----------------------------------------------------------