Skip to content

Commit f1c4753

Browse files
author
kahsa
authored
gg: fix draw_line (#10534)
1 parent 6dbe8a8 commit f1c4753

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vlib/gg/gg.v

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,11 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) {
583583
sgl.load_pipeline(ctx.timage_pip)
584584
}
585585

586-
ctx.draw_line_with_config(x, y, x2, y2, color: c)
586+
sgl.c4b(c.r, c.g, c.b, c.a)
587+
sgl.begin_line_strip()
588+
sgl.v2f(x * ctx.scale, y * ctx.scale)
589+
sgl.v2f(x2 * ctx.scale, y2 * ctx.scale)
590+
sgl.end()
587591
}
588592

589593
// draw_line_with_config draws a line between the points provided with the PenConfig

0 commit comments

Comments
 (0)