Closed
Description
Right now the method is to scale the canvas by a certain amount before painting and round paint coordinates for rects to the nearest integer. But that only produces sharp edges when the zoom is an integer.
It's not hard to support any arbitrary zoom level (like 1.3333
). Don't scale the canvas at all and instead, the painting code receives the zoom level as an input, multiplies the layout coordinates by that, and then rounds. This is particularly useful for browser zoom, which makes the window.devicePixelRatio
non-even. Things should line up correctly.
Browsers use a much more complicated method of snapping the layouts to pixels. I don't totally know why that is; maybe to produce more desirable results at the extremes.
Metadata
Metadata
Assignees
Labels
No labels