Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Fix DPI display scaling to make overlays render at the native resolution

Open Keavon opened this issue 1 year ago • 2 comments

We use a <canvas> element for displaying our overlays on top of the artwork. But for users with a DPI display scaling ratio other than 100%, this won't be drawn correctly. Then the rounding in the overlay drawing code, which is designed to ensure that overlays are rendered crisply without antialiasing fuzziness, will also need to be updated to ensure that continues to work at a new pixel grid ratio/alignment.

Keavon avatar Mar 14 '24 22:03 Keavon

I want to work on this task, would you be able to give some starting point in the codebase if I'm possibly looking at the wrong place? Right now I'm thinking about making a change somewhere around https://github.com/GraphiteEditor/Graphite/blob/master/frontend/src/components/floating-menus/EyedropperPreview.svelte#L17 image

CheeksTheGeek avatar Mar 22 '24 04:03 CheeksTheGeek

@CheeksTheGeek You'll want to look in editor/src/messages/portfolio/document/overlays/overlays_message_handler.rs.

0HyperCube avatar Mar 26 '24 16:03 0HyperCube