From f1c4753cc01779de609ca0c4f3525be3d8ecfd6f Mon Sep 17 00:00:00 2001 From: kahsa Date: Tue, 22 Jun 2021 02:30:03 +0900 Subject: [PATCH] gg: fix draw_line (#10534) --- vlib/gg/gg.v | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 401a1afa46..aa6b456928 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -583,7 +583,11 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) { sgl.load_pipeline(ctx.timage_pip) } - ctx.draw_line_with_config(x, y, x2, y2, color: c) + sgl.c4b(c.r, c.g, c.b, c.a) + sgl.begin_line_strip() + sgl.v2f(x * ctx.scale, y * ctx.scale) + sgl.v2f(x2 * ctx.scale, y2 * ctx.scale) + sgl.end() } // draw_line_with_config draws a line between the points provided with the PenConfig