From 66249b8c45526a2a46bef3b760e65ec483501620 Mon Sep 17 00:00:00 2001 From: Tim Marston Date: Wed, 28 Sep 2022 08:40:40 +0100 Subject: [PATCH] gg: radius_to_segments() should use Context.scale (#15906) --- vlib/gg/draw.c.v | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vlib/gg/draw.c.v b/vlib/gg/draw.c.v index 666a760880..4f0f8d2760 100644 --- a/vlib/gg/draw.c.v +++ b/vlib/gg/draw.c.v @@ -515,7 +515,7 @@ pub fn (ctx &Context) draw_circle_empty(x f32, y f32, radius f32, c gx.Color) { mut theta := f32(0) mut xx := f32(0) mut yy := f32(0) - segments := radius_to_segments(radius) + segments := radius_to_segments(radius * ctx.scale) sgl.begin_line_strip() 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) { return } } - ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius), 0, c) + ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius * ctx.scale), 0, c) } // draw_polygon_filled draws a filled polygon.