Ignore:
Timestamp:
Dec 3, 2023, 11:28:08 AM (6 months ago)
Author:
chronos
Message:
  • Added: High DPI support integrated into trunk branch. It can be enabled by adding DPI define to compiler parameters for main project and packages.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/IsoEngine.pas

    r456 r468  
    66uses
    77  Protocol, ClientTools, ScreenTools, Tribes, LCLIntf, LCLType, SysUtils,
    8   Classes, Graphics, PixelPointer, GraphicSet;
     8  Classes, GraphicSet,
     9  {$IFDEF DPI}Dpi.Graphics, Dpi.PixelPointer, Dpi.Common{$ELSE}
     10  Graphics, PixelPointer{$ENDIF};
    911
    1012const
     
    215217begin
    216218  LandPatch := TBitmap.Create;
    217   LandPatch.PixelFormat := pf24bit;
     219  LandPatch.PixelFormat := TPixelFormat.pf24bit;
    218220  OceanPatch := TBitmap.Create;
    219   OceanPatch.PixelFormat := pf24bit;
     221  OceanPatch.PixelFormat := TPixelFormat.pf24bit;
    220222  Borders := TBitmap.Create;
    221   Borders.PixelFormat := pf24bit;
     223  Borders.PixelFormat := TPixelFormat.pf24bit;
    222224  HGrTerrain := nil;
    223225  HGrCities := nil;
     
    251253  Mask24 := TBitmap.Create;
    252254  Mask24.Assign(HGrTerrain.Mask);
    253   Mask24.PixelFormat := pf24bit;
     255  Mask24.PixelFormat := TPixelFormat.pf24bit;
    254256  Mask24.BeginUpdate;
    255257  for ySrc := 0 to TerrainIconLines - 1 do begin
     
    344346  OceanPatch.Canvas.FillRect(0, 0, OceanPatch.Width, OceanPatch.Height);
    345347  LandMore := TBitmap.Create;
    346   LandMore.PixelFormat := pf24bit;
     348  LandMore.PixelFormat := TPixelFormat.pf24bit;
    347349  LandMore.Canvas.Brush.Color := 0;
    348350  LandMore.SetSize(xxt * 18, yyt * 9);
    349351  LandMore.Canvas.FillRect(0, 0, LandMore.Width, LandMore.Height);
    350352  OceanMore := TBitmap.Create;
    351   OceanMore.PixelFormat := pf24bit;
     353  OceanMore.PixelFormat := TPixelFormat.pf24bit;
    352354  OceanMore.Canvas.Brush.Color := 0;
    353355  OceanMore.SetSize(xxt * 8, yyt * 4);
    354356  OceanMore.Canvas.FillRect(0, 0, OceanMore.Width, OceanMore.Height);
    355357  DitherMask := TBitmap.Create;
    356   DitherMask.PixelFormat := pf24bit;
     358  DitherMask.PixelFormat := TPixelFormat.pf24bit;
    357359  DitherMask.SetSize(xxt * 2, yyt * 2);
    358360  DitherMask.Canvas.FillRect(0, 0, DitherMask.Width, DitherMask.Height);
     
    584586  FOutput.Canvas.Brush.Color := Color;
    585587  FOutput.Canvas.FillRect(Rect(X, Y, X + Width, Y + Height));
    586   FOutput.Canvas.Brush.Style := bsClear;
     588  FOutput.Canvas.Brush.Style := TBrushStyle.bsClear;
    587589end;
    588590
     
    10801082      xs := X + xxt - (W + 1) div 2;
    10811083      if IsCapital then
    1082         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [fsUnderline];
     1084        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style + [TFontStyle.fsUnderline];
    10831085      Textout(xs + 1, Y - 9, $000000, S);
    10841086      Textout(xs, Y - 10, $FFFFFF, S);
    10851087      if IsCapital then
    1086         FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [fsUnderline];
     1088        FOutput.Canvas.Font.Style := FOutput.Canvas.Font.Style - [TFontStyle.fsUnderline];
    10871089    end;
    10881090  end;
     
    15091511    Brush.Color := $000000;
    15101512    FillRect(Rect(FLeft, RealTop, FRight, RealBottom));
    1511     Brush.Style := bsClear;
     1513    Brush.Style := TBrushStyle.bsClear;
    15121514  end;
    15131515
Note: See TracChangeset for help on using the changeset viewer.