gg:fix draw_line for android (#9882)
parent
9d68f924c3
commit
f36e46bfde
|
@ -560,6 +560,7 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) {
|
|||
if c.a != 255 {
|
||||
sgl.load_pipeline(ctx.timage_pip)
|
||||
}
|
||||
$if !android {
|
||||
if ctx.scale > 1 {
|
||||
// Make the line more clear on hi dpi screens: draw a rectangle
|
||||
mut width := mu.abs(x2 - x)
|
||||
|
@ -572,6 +573,7 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) {
|
|||
ctx.draw_rect(x, y, width, height, c)
|
||||
return
|
||||
}
|
||||
}
|
||||
sgl.c4b(c.r, c.g, c.b, c.a)
|
||||
sgl.begin_line_strip()
|
||||
sgl.v2f(x * ctx.scale, y * ctx.scale)
|
||||
|
|
Loading…
Reference in New Issue