gg: fix draw_line (#10534)

pull/10540/head
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
1 changed files with 5 additions and 1 deletions

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