macroquad
macroquad copied to clipboard
Labels cut off if drawn within a window with high_dpi: true
Take this code:
root_ui().window(
hash!(),
Vec2::new(0.0, 0.0),
Vec2::new(100.0, 100.0),
|ui| {
ui.label(None, "foo bar baz");
},
);
If we run this with high_dpi: false, it renders correctly. But, render with high_dpi: true and unfortunately the label gets cut off:

If I just draw a label outside of the window, it works fine:

I tried to debug this a little; commenting out this line https://github.com/not-fl3/macroquad/blob/master/src/ui/render/painter.rs#L506 in the Painter does fix it, so that would imply that the logic to determine clips might be being thrown off by the high_dpi flag somewhere and we might need to account for it. But unfortunately I've not been able to make more progress beyond that.