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

gg: add scaling to draw_empty_poly() (#11272)

This commit is contained in:
Benjamin Stigsen 2021-08-22 23:37:20 +02:00 committed by GitHub
parent 1cfc4198f5
commit 352df873d5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -668,9 +668,9 @@ pub fn (ctx &Context) draw_empty_poly(points []f32, c gx.Color) {
sgl.begin_line_strip()
for i in 0 .. len {
sgl.v2f(points[2 * i], points[2 * i + 1])
sgl.v2f(points[2 * i] * ctx.scale, points[2 * i + 1] * ctx.scale)
}
sgl.v2f(points[0], points[1])
sgl.v2f(points[0] * ctx.scale, points[1] * ctx.scale)
sgl.end()
}