diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-12 07:01:58 -0800 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2016-11-12 07:01:58 -0800 |
commit | 0e509fc38cb9051340ef9bf07f51a528643e636f (patch) | |
tree | 8bc4c5b928ba71e1ed8310aaf368c86adbadd1b0 /grc/gui/Utils.py | |
parent | caf9120c31b5a0dfbcbc24fdd5d958017a7db963 (diff) | |
parent | b27e602ac7db40383363f7297a4834ac2647641e (diff) |
Merge branch 'master' into next
Diffstat (limited to 'grc/gui/Utils.py')
-rw-r--r-- | grc/gui/Utils.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/grc/gui/Utils.py b/grc/gui/Utils.py index 7d15d47142..3ab8d2009e 100644 --- a/grc/gui/Utils.py +++ b/grc/gui/Utils.py @@ -136,3 +136,7 @@ def align_to_grid(coor, mode=round): def scale(coor, reverse=False): factor = DPI_SCALING if not reverse else 1 / DPI_SCALING return tuple(int(x * factor) for x in coor) + +def scale_scalar(coor, reverse=False): + factor = DPI_SCALING if not reverse else 1 / DPI_SCALING + return int(coor * factor) |