From c65da01e6c9a26830d6cb4a8d00b350c3e8fa221 Mon Sep 17 00:00:00 2001 From: tomascz Date: Sat, 24 Jun 2023 18:52:04 +0200 Subject: [PATCH] [#40] Track Map: General improvements and bugfixes (Part 32.1: Missing modifications) --- Main/src/Utils.cpp | 6 ++++++ Main/src/Utils.h | 1 + 2 files changed, 7 insertions(+) diff --git a/Main/src/Utils.cpp b/Main/src/Utils.cpp index 636187e3..c66324e5 100644 --- a/Main/src/Utils.cpp +++ b/Main/src/Utils.cpp @@ -1992,6 +1992,12 @@ namespace Utils{ } } + void ScaleLogicalUnit(PINT values,BYTE nValues){ + // adds to specified Values the logical unit scale factor + while (nValues--) + *values++*=LogicalUnitScaleFactor; + } + void UnscaleLogicalUnit(PINT values,BYTE nValues){ // removes from specified Values the logical unit scale factor while (nValues--) diff --git a/Main/src/Utils.h b/Main/src/Utils.h index 941046fd..efde477d 100644 --- a/Main/src/Utils.h +++ b/Main/src/Utils.h @@ -520,6 +520,7 @@ namespace Utils{ CString BytesToHexaText(const char *chars,BYTE nChars,bool lastDelimitedWithAnd); void NavigateToUrlInDefaultBrowser(LPCTSTR url); void ScaleLogicalUnit(HDC dc); + void ScaleLogicalUnit(PINT values,BYTE nValues); void UnscaleLogicalUnit(PINT values,BYTE nValues); COLORREF GetSaturatedColor(COLORREF color,float saturationFactor); COLORREF GetBlendedColor(COLORREF color1,COLORREF color2,float blendFactor=.5f);