Changeset 323 for trunk/LocalPlayer


Ignore:
Timestamp:
Mar 23, 2021, 2:46:42 PM (4 years ago)
Author:
chronos
Message:
  • Modified: Created single procedure for unshare/free bitmap before BitBlt use.
Location:
trunk/LocalPlayer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LocalPlayer/CityScreen.pas

    r318 r323  
    259259    AgePrepared := MainTextureAge;
    260260
    261     // TODO: FillRect should not be needed as BitBlt is with SRCCOPY
    262     Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight);
    263 
     261    UnshareBitmap(Back);
    264262    BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight,
    265263      MainTexture.Image.Canvas, 0, 0);
     
    358356procedure TCityDlg.InitZoomCityMap;
    359357begin
    360   // TODO: FillRect should not be needed as BitBlt is with SRCCOPY
    361   ZoomCityMap.Canvas.FillRect(0, 0, ZoomCityMap.Width, ZoomCityMap.Height);
    362 
     358  UnshareBitmap(ZoomCityMap);
    363359  BitBltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap,
    364360    Back.Canvas, xZoomMap, yZoomMap);
  • trunk/LocalPlayer/Draft.pas

    r318 r323  
    233233begin
    234234  inherited;
    235   // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    236   Back.Canvas.FillRect(0, 0, Back.Width, Back.Height);
     235  UnshareBitmap(Back);
    237236
    238237  ClientHeight := Template.Height - Cut;
  • trunk/LocalPlayer/MessgEx.pas

    r318 r323  
    292292
    293293  // paint
    294   // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    295   LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);
     294  UnshareBitmap(LogoBuffer);
    296295  BitBltCanvas(LogoBuffer.Canvas, 0, 0, BookRect.Width, BookRect.Height, ca, x, y);
    297296
     
    374373      begin
    375374        p1 := MyRO.Wonder[IconIndex].EffectiveOwner;
    376         // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it
    377         Buffer.Canvas.FillRect(0, 0, 1, 1);
     375        UnshareBitmap(Buffer);
    378376        BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange,
    379377          ySizeBig + 2 * GlowRange, Canvas,
Note: See TracChangeset for help on using the changeset viewer.