mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
gg: fix draw_line on m1
This commit is contained in:
parent
5b2046342b
commit
98613036c1
@ -9,7 +9,6 @@ import sokol.sapp
|
|||||||
import sokol.sgl
|
import sokol.sgl
|
||||||
import sokol.gfx
|
import sokol.gfx
|
||||||
import math
|
import math
|
||||||
import math.mathutil as mu
|
|
||||||
|
|
||||||
// import time
|
// import time
|
||||||
pub type FNCb = fn (x voidptr)
|
pub type FNCb = fn (x voidptr)
|
||||||
@ -569,8 +568,8 @@ pub fn (ctx &Context) draw_line(x f32, y f32, x2 f32, y2 f32, c gx.Color) {
|
|||||||
$if !android {
|
$if !android {
|
||||||
if ctx.scale > 1 {
|
if ctx.scale > 1 {
|
||||||
// Make the line more clear on hi dpi screens: draw a rectangle
|
// Make the line more clear on hi dpi screens: draw a rectangle
|
||||||
mut width := mu.abs(x2 - x)
|
mut width := (x2 - x)
|
||||||
mut height := mu.abs(y2 - y)
|
mut height := (y2 - y)
|
||||||
if width == 0 {
|
if width == 0 {
|
||||||
width = 1
|
width = 1
|
||||||
} else if height == 0 {
|
} else if height == 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user