From 5a3a145e999c44074adc4febe7e301d44be2a403 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Mon, 25 Jul 2022 17:25:28 +0300 Subject: [PATCH] gg: fix native draw_circle on macos --- vlib/gg/draw.c.v | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlib/gg/draw.c.v b/vlib/gg/draw.c.v index 8c0be4009..df7fb1f62 100644 --- a/vlib/gg/draw.c.v +++ b/vlib/gg/draw.c.v @@ -521,6 +521,13 @@ pub fn (ctx &Context) draw_circle_empty(x f32, y f32, radius f32, c gx.Color) { // `radius` defines the radius of the circle. // `c` is the fill color. pub fn (ctx &Context) draw_circle_filled(x f32, y f32, radius f32, c gx.Color) { + $if macos { + if ctx.native_rendering { + C.darwin_draw_circle(x - radius + 1, ctx.height - (y + radius + 3), radius, + c) + return + } + } ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius), 0, c) } -- 2.30.2