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

gg: fix draw_line (#10534)

This commit is contained in:
kahsa 2021-06-22 02:30:03 +09:00 committed by GitHub
parent 6dbe8a8a2c
commit f1c4753cc0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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