add scaled function code

This commit is contained in:
vcaesar 2020-03-08 10:09:24 -04:00
parent 0e570e2eb9
commit 730e7537bf

View File

@ -220,6 +220,11 @@ func SysScale() float64 {
return float64(s)
}
// Scaled x * sys-scale
func Scaled(x int) int {
return int(float64(x) * SysScale())
}
// ScaleY get primary display vertical DPI scale factor
func ScaleY() int {
return int(C.scale_y())