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/Draft.pas

    r193 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, ExtCtrls,
    910  ButtonA,
     
    9192  Template := TDpiBitmap.Create;
    9293  Template.PixelFormat := pf24bit;
    93   LoadGraphicFile(Template, HomeDir + 'Graphics' + DirectorySeparator + 'MiliRes.png', gfNoGamma);
     94  LoadGraphicFile(Template, GetGraphicsDir + DirectorySeparator + 'MiliRes.png', gfNoGamma);
    9495end;
    9596
     
    238239  // assemble background from 2 texture tiles
    239240  begin
    240     Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, 64,
    241       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    242       hMainTexture - 64, SRCCOPY);
    243     Dpibitblt(Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,
    244       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    245       0, SRCCOPY);
     241    DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
     242      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     243      hMainTexture - 64);
     244    DpiBitCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
     245      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     246      0);
    246247  end
    247248  else
    248     Dpibitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    249       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    250       (hMainTexture - ClientHeight) div 2, SRCCOPY);
     249    DpiBitCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     250      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     251      (hMainTexture - ClientHeight) div 2);
    251252  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    252253  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
    253254    Template.Height - 64 - Cut);
    254255
    255   Dpibitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    256     Back.Canvas.Handle, 0, 0, SRCCOPY);
     256  DpiBitCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
     257    Back.Canvas, 0, 0);
    257258
    258259  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
Note: See TracChangeset for help on using the changeset viewer.