Skip to content

Commit 66249b8

Browse files
authored
gg: radius_to_segments() should use Context.scale (#15906)
1 parent b85a535 commit 66249b8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vlib/gg/draw.c.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ pub fn (ctx &Context) draw_circle_empty(x f32, y f32, radius f32, c gx.Color) {
515515
mut theta := f32(0)
516516
mut xx := f32(0)
517517
mut yy := f32(0)
518-
segments := radius_to_segments(radius)
518+
segments := radius_to_segments(radius * ctx.scale)
519519

520520
sgl.begin_line_strip()
521521
for i := 0; i < segments + 1; i++ {
@@ -539,7 +539,7 @@ pub fn (ctx &Context) draw_circle_filled(x f32, y f32, radius f32, c gx.Color) {
539539
return
540540
}
541541
}
542-
ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius), 0, c)
542+
ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius * ctx.scale), 0, c)
543543
}
544544

545545
// draw_polygon_filled draws a filled polygon.

0 commit comments

Comments
 (0)