Ignore:
Timestamp:
May 6, 2020, 11:21:12 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Simplified code by replacing BitBlt which uses always handles by BitBltCanvas which uses directly TCanvas objects. Used default ROP SRCCOPY.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/Draft.pas

    r104 r188  
    239239  // assemble background from 2 texture tiles
    240240  begin
    241     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, 64,
    242       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    243       hMainTexture - 64, SRCCOPY);
    244     bitblt(Back.Canvas.Handle, 0, 64, ClientWidth, ClientHeight - 64,
    245       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    246       0, SRCCOPY);
     241    bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, 64,
     242      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     243      hMainTexture - 64);
     244    bitbltCanvas(Back.Canvas, 0, 64, ClientWidth, ClientHeight - 64,
     245      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     246      0);
    247247  end
    248248  else
    249     bitblt(Back.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    250       MainTexture.Image.Canvas.Handle, (wMainTexture - ClientWidth) div 2,
    251       (hMainTexture - ClientHeight) div 2, SRCCOPY);
     249    bitbltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
     250      MainTexture.Image.Canvas, (wMainTexture - ClientWidth) div 2,
     251      (hMainTexture - ClientHeight) div 2);
    252252  ImageOp_B(Back, Template, 0, 0, 0, 0, Template.Width, 64);
    253253  ImageOp_B(Back, Template, 0, 64, 0, 64 + Cut, Template.Width,
    254254    Template.Height - 64 - Cut);
    255255
    256   bitblt(offscreen.Canvas.Handle, 0, 0, ClientWidth, ClientHeight,
    257     Back.Canvas.Handle, 0, 0, SRCCOPY);
     256  bitbltCanvas(offscreen.Canvas, 0, 0, ClientWidth, ClientHeight,
     257    Back.Canvas, 0, 0);
    258258
    259259  offscreen.Canvas.Font.Assign(UniFont[ftCaption]);
Note: See TracChangeset for help on using the changeset viewer.