1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: fix native draw_circle on macos

This commit is contained in:
Alexander Medvednikov 2022-07-25 17:25:28 +03:00
parent f619becbdc
commit 5a3a145e99

View File

@ -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. // `radius` defines the radius of the circle.
// `c` is the fill color. // `c` is the fill color.
pub fn (ctx &Context) draw_circle_filled(x f32, y f32, radius f32, c gx.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) ctx.draw_polygon_filled(x, y, radius, radius_to_segments(radius), 0, c)
} }