pixel-canvas icon indicating copy to clipboard operation
pixel-canvas copied to clipboard

DPI isn't right on Mac with retina display

Open jorendorff opened this issue 1 year ago • 1 comments

The demo included in the crate-level doc-string doesn't render correctly.

  • As written, the circle that is supposed to follow the mouse is centered at a point twice as far from the upper left corner as the actual mouse pointer.

  • If I add .hidpi(true) to the canvas setup, the window covers the same amount of screen area (as measured in inches), but the image is rendered at twice the pixel density. The circle is smaller. But its center is still twice as far from the upper left as the mouse pointer.

The error has to be either in input.rs or in Glutin itself...

jorendorff avatar May 25 '23 22:05 jorendorff