PistonDevelopers / gfx_graphics

A Gfx 2D back-end for the Piston game engine
MIT License
55 stars 31 forks source link

Scissor width and height are not proportional to scale_factor #375

Open shinmili opened 3 years ago

shinmili commented 3 years ago

When I run draw_state example with 1.25x scale factor (which is my monitor default), the output of draw_state.rs example is like the image below. The code tells the logo to be scissored with 100x100 width and height, but actually it's scissored with 75x75:

draw_state

The output of the example with 1x scale factor (running WINIT_X11_SCALE_FACTOR=1 cargo run --example draw_state) is like the image below. I think this is correctly scissored, and the result of 1.25x should be like this output image enlarged by 1.25x.

draw_state2

shinmili commented 3 years ago

340 can be the same issue. With higher scale factor (like 2.0x), the rust logo to be scissored didn't even show up.