diff --git a/vlib/gg/draw.c.v b/vlib/gg/draw.c.v index b1488961cd11a2..aace662ea2cf58 100644 --- a/vlib/gg/draw.c.v +++ b/vlib/gg/draw.c.v @@ -343,8 +343,11 @@ pub fn (ctx &Context) draw_rounded_rect_empty(x f32, y f32, w f32, h f32, radius sgl.v2f(rtx + r, rty) sgl.v2f(rtx + r, rby) // bottom - sgl.v2f(lbx, lby + r - 1) - sgl.v2f(rbx, rby + r - 1) + // Note: test on native windows, macos, and linux if you need to change the offset literal here, + // with `v run vlib/gg/testdata/draw_rounded_rect_empty.vv` . Using 1 here, looks good on windows, + // and on linux with LIBGL_ALWAYS_SOFTWARE=true, but misaligned on native macos and linux. + sgl.v2f(lbx, lby + r - 0.5) + sgl.v2f(rbx, rby + r - 0.5) // left sgl.v2f(sx + 1, lty) sgl.v2f(sx + 1, lby)