- Timestamp:
- Jan 4, 2024, 11:52:05 PM (11 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/DpiControls/Dpi.Common.pas
r515 r516 5 5 uses 6 6 {$IFDEF WINDOWS}Windows,{$ENDIF} 7 Classes, SysUtils, LCLType, Types, Math,LCLIntf, Graphics, Dpi.Graphics;7 Classes, SysUtils, LCLType, Types, LCLIntf, Graphics, Dpi.Graphics; 8 8 9 9 const … … 100 100 function ScaleToNative(Value: Integer): Integer; 101 101 begin 102 Result := Ceil(Value * ScreenInfo.Dpi / 96);102 Result := Round(Value * ScreenInfo.Dpi / 96); 103 103 end; 104 104 … … 110 110 function ScaleFromNative(Value: Integer): Integer; 111 111 begin 112 Result := Floor(Value * 96 / ScreenInfo.Dpi);112 Result := Round(Value * 96 / ScreenInfo.Dpi); 113 113 end; 114 114
Note:
See TracChangeset
for help on using the changeset viewer.