diff options
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 d85b846b3a..a102a8a873 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) |