- Timestamp:
- Apr 20, 2024, 8:45:50 PM (8 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/DpiControls/Dpi.Common.pas
r546 r547 60 60 SrcPixel: TPixelPointer; 61 61 DstPixel: TPixelPointer; 62 DstWidth, DstHeight: Integer;63 SrcWidth, SrcHeight: Integer;64 62 XX, YY: Integer; 65 63 DstPixelX, DstPixelY: Integer; 66 XNative, YNative: Integer;67 64 DstPixelWidth, DstPixelHeight: Integer; 68 65 NewX, NewY: Integer; … … 107 104 Exit; 108 105 end; 109 110 DstWidth := ScaleToNativeDist(X, Width);111 DstHeight := ScaleToNativeDist(Y, Height);112 SrcWidth := ScaleToNativeDist(XSrc, Width);113 SrcHeight := ScaleToNativeDist(YSrc, Height);114 XNative := ScaleToNative(X);115 YNative := ScaleToNative(Y);116 106 117 107 Dest.BeginUpdate; … … 248 238 function ScaleToNative(Value: Integer): Integer; 249 239 begin 250 Result := Ceil(Value * ScreenInfo.ToNative); 240 // Round function is faster than Ceil and Floor 241 Result := Round(Value * ScreenInfo.ToNative); 251 242 end; 252 243
Note:
See TracChangeset
for help on using the changeset viewer.