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

gg: vfmt gg.v

This commit is contained in:
Alexander Medvednikov 2020-11-15 15:11:43 +01:00
parent 26785668c0
commit ad1510afa0

View File

@ -310,13 +310,13 @@ pub fn (ctx &Context) draw_circle_line(x f32, y f32, r int, segments int, c gx.C
pub fn (ctx &Context) draw_circle(x f32, y f32, r f32, c gx.Color) { pub fn (ctx &Context) draw_circle(x f32, y f32, r f32, c gx.Color) {
if ctx.scale == 1 { if ctx.scale == 1 {
ctx.draw_circle_with_segments(x,y,r,10, c) ctx.draw_circle_with_segments(x, y, r, 10, c)
} } else {
else { ctx.draw_circle_with_segments(x * f32(ctx.scale), y * f32(ctx.scale), r * ctx.scale,
ctx.draw_circle_with_segments(x*f32(ctx.scale),y*f32(ctx.scale),r*ctx.scale,10, c) 10, c)
} }
} }
pub fn (ctx &Context) draw_circle_with_segments(x f32, y f32, r f32, segments int, c gx.Color) { pub fn (ctx &Context) draw_circle_with_segments(x f32, y f32, r f32, segments int, c gx.Color) {
if c.a != 255 { if c.a != 255 {
sgl.load_pipeline(ctx.timage_pip) sgl.load_pipeline(ctx.timage_pip)