mirror of
https://github.com/go-vgo/robotgo
synced 2026-05-23 17:59:12 +00:00
add scaled function code
This commit is contained in:
parent
0e570e2eb9
commit
730e7537bf
1 changed files with 5 additions and 0 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Reference in a new issue