Changeset 520


Ignore:
Timestamp:
Jan 6, 2024, 9:33:35 AM (11 months ago)
Author:
chronos
Message:
  • Modified: Use Floor in ScaleFromNative to avoid getting out of range values. Incorrect pixels visible in bottom part of minimap.
Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MiniMap.pas

    r506 r520  
    7171  y: Integer;
    7272  Dummy: Integer;
    73   FileLandMass: integer;
     73  FileLandMass: Integer;
    7474  LogFile: file;
    7575  s: string[255];
  • trunk/Packages/DpiControls/Dpi.Common.pas

    r519 r520  
    110110function ScaleFromNative(Value: Integer): Integer;
    111111begin
    112   Result := Round(Value * 96 / ScreenInfo.Dpi);
     112  Result := Floor(Value * 96 / ScreenInfo.Dpi);
    113113end;
    114114
  • trunk/Start.pas

    r514 r520  
    873873
    874874    S := '';
    875     if MiniMap.Mode = mmPicture then
    876     begin
     875    if MiniMap.Mode = mmPicture then begin
    877876      BitBltCanvas(Canvas, xMini + 2, yMini + 2, MiniMap.Size.X * 2, MiniMap.Size.Y,
    878877        MiniMap.Bitmap.Canvas, 0, 0);
Note: See TracChangeset for help on using the changeset viewer.