mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
gg: fix the alignment of the bottom border of draw_rounded_rect_empty on macos and linux
This commit is contained in:
parent
e0e0987117
commit
2af135d716
1 changed files with 5 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue