Ignore:
Timestamp:
May 9, 2020, 4:02:07 PM (5 years ago)
Author:
chronos
Message:
  • Modified: Improved HighDPI branch. Imported new changes from trunk branch.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/LocalPlayer/NatStat.pas

    r179 r210  
    55
    66uses
    7   Protocol, ClientTools, Term, ScreenTools, BaseWin, UDpiControls,
     7  UDpiControls, Protocol, ClientTools, Term, ScreenTools, BaseWin,
     8
    89  LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms,
    910  ButtonB, ButtonC, Menus, EOTButton;
     
    9293  Template := TDpiBitmap.Create;
    9394  Template.PixelFormat := pf24bit;
    94   LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'Nation.png', gfNoGamma);
     95  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'Nation.png', gfNoGamma);
    9596end;
    9697
     
    108109  begin
    109110    AgePrepared := MainTextureAge;
    110     Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    111       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    112       (hMainTexture - ClientHeight) div 2, SRCCOPY);
     111    DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     112      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     113      (hMainTexture - ClientHeight) div 2);
    113114    ImageOp_B(Back, Template, 0, 0, 0, 0, ClientWidth, ClientHeight);
    114115  end
     
    263264  Extinct := 1 shl pView and MyRO.Alive = 0;
    264265
    265   Dpibitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    266     Back.Canvas.Handle, 0, 0, SRCCOPY);
     266  DpiBitCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
     267    Back.Canvas, 0, 0);
    267268
    268269  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
Note: See TracChangeset for help on using the changeset viewer.