@@ -611,7 +611,7 @@ pub fn (ctx &Context) draw_rounded_rect(x f32, y f32, w f32, h f32, radius f32,
611
611
sgl.v2f (lx, ly)
612
612
}
613
613
// right top
614
- mut rx := nx + 2 * width - r
614
+ mut rx := nx + width - r
615
615
mut ry := ny + r
616
616
for i in rt .. int (segments) {
617
617
theta = 2 * f32 (math.pi) * f32 (i) / segments
@@ -622,7 +622,7 @@ pub fn (ctx &Context) draw_rounded_rect(x f32, y f32, w f32, h f32, radius f32,
622
622
}
623
623
// right bottom
624
624
mut rbx := rx
625
- mut rby := ny + 2 * height - r
625
+ mut rby := ny + height - r
626
626
for i in rb .. lb {
627
627
theta = 2 * f32 (math.pi) * f32 (i) / segments
628
628
xx = r * math.cosf (theta)
@@ -632,7 +632,7 @@ pub fn (ctx &Context) draw_rounded_rect(x f32, y f32, w f32, h f32, radius f32,
632
632
}
633
633
// left bottom
634
634
mut lbx := lx
635
- mut lby := ny + 2 * height - r
635
+ mut lby := ny + height - r
636
636
for i in lb .. lt {
637
637
theta = 2 * f32 (math.pi) * f32 (i) / segments
638
638
xx = r * math.cosf (theta)
@@ -678,7 +678,7 @@ pub fn (ctx &Context) draw_empty_rounded_rect(x f32, y f32, w f32, h f32, radius
678
678
sgl.v2f (xx + lx, yy + ly)
679
679
}
680
680
// right top
681
- mut rx := nx + 2 * width - r
681
+ mut rx := nx + width - r
682
682
mut ry := ny + r
683
683
for i in rt .. int (segments) {
684
684
theta = 2 * f32 (math.pi) * f32 (i) / segments
@@ -688,7 +688,7 @@ pub fn (ctx &Context) draw_empty_rounded_rect(x f32, y f32, w f32, h f32, radius
688
688
}
689
689
// right bottom
690
690
mut rbx := rx
691
- mut rby := ny + 2 * height - r
691
+ mut rby := ny + height - r
692
692
for i in rb .. lb {
693
693
theta = 2 * f32 (math.pi) * f32 (i) / segments
694
694
xx = r * math.cosf (theta)
@@ -697,7 +697,7 @@ pub fn (ctx &Context) draw_empty_rounded_rect(x f32, y f32, w f32, h f32, radius
697
697
}
698
698
// left bottom
699
699
mut lbx := lx
700
- mut lby := ny + 2 * height - r
700
+ mut lby := ny + height - r
701
701
for i in lb .. lt {
702
702
theta = 2 * f32 (math.pi) * f32 (i) / segments
703
703
xx = r * math.cosf (theta)
0 commit comments