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

    r57 r188  
    114114        xSwitch + 38 + i * 42, ySwitch + 22, MainTexture.clBevelLight,
    115115        MainTexture.clBevelShade);
    116     BitBlt(offscreen.Canvas.Handle, xSwitch + 2 + i * 42, ySwitch + 2,
    117       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle, (i + 3) * xSizeSmall,
    118       0, SRCCOPY)
     116    BitBltCanvas(offscreen.Canvas, xSwitch + 2 + i * 42, ySwitch + 2,
     117      xSizeSmall, ySizeSmall, SmallImp.Canvas, (i + 3) * xSizeSmall, 0);
    119118  end;
    120119  RisedTextOut(offscreen.Canvas, 8, yList + 32 * nListRow + 2,
     
    149148      yList + 16 + ySizeSmall div 2 + i div nListCol * 32,
    150149      MainTexture.clBevelLight, MainTexture.clBevelShade);
    151     BitBlt(offscreen.Canvas.Handle, xList + 21 - xSizeSmall div 2 +
     150    BitBltCanvas(offscreen.Canvas, xList + 21 - xSizeSmall div 2 +
    152151      i mod nListCol * 42, yList + 16 - ySizeSmall div 2 + i div nListCol * 32,
    153       xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     152      xSizeSmall, ySizeSmall, SmallImp.Canvas,
    154153      MyData.ImpOrder[ctype, i] mod 7 * xSizeSmall,
    155154      (MyData.ImpOrder[ctype, i] + SystemIconLines * 7) div 7 *
    156       ySizeSmall, SRCCOPY);
     155      ySizeSmall);
    157156    inc(i);
    158157  end;
     
    172171        nPool div nPoolCol * 32, MainTexture.clBevelLight,
    173172        MainTexture.clBevelShade);
    174       BitBlt(offscreen.Canvas.Handle, xPool + 21 - xSizeSmall div 2 +
     173      BitBltCanvas(offscreen.Canvas, xPool + 21 - xSizeSmall div 2 +
    175174        nPool mod nPoolCol * 42, yPool + 16 - ySizeSmall div 2 +
    176         nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas.Handle,
     175        nPool div nPoolCol * 32, xSizeSmall, ySizeSmall, SmallImp.Canvas,
    177176        iix mod 7 * xSizeSmall, (iix + SystemIconLines * 7) div 7 *
    178         ySizeSmall, SRCCOPY);
    179       inc(nPool)
     177        ySizeSmall);
     178      inc(nPool);
    180179    end;
    181180  DeleteBtn.Visible := MyData.ImpOrder[ctype, 0] >= 0;
Note: See TracChangeset for help on using the changeset viewer.