Changeset 323
- Timestamp:
- Mar 23, 2021, 2:46:42 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LocalPlayer/CityScreen.pas
r318 r323 259 259 AgePrepared := MainTextureAge; 260 260 261 // TODO: FillRect should not be needed as BitBlt is with SRCCOPY 262 Back.Canvas.FillRect(0, 0, ClientWidth, ClientHeight); 263 261 UnshareBitmap(Back); 264 262 BitBltCanvas(Back.Canvas, 0, 0, ClientWidth, ClientHeight, 265 263 MainTexture.Image.Canvas, 0, 0); … … 358 356 procedure TCityDlg.InitZoomCityMap; 359 357 begin 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); 363 359 BitBltCanvas(ZoomCityMap.Canvas, 0, 0, wZoomMap, hZoomMap, 364 360 Back.Canvas, xZoomMap, yZoomMap); -
trunk/LocalPlayer/Draft.pas
r318 r323 233 233 begin 234 234 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); 237 236 238 237 ClientHeight := Template.Height - Cut; -
trunk/LocalPlayer/MessgEx.pas
r318 r323 292 292 293 293 // 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); 296 295 BitBltCanvas(LogoBuffer.Canvas, 0, 0, BookRect.Width, BookRect.Height, ca, x, y); 297 296 … … 374 373 begin 375 374 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); 378 376 BitBltCanvas(Buffer.Canvas, 0, 0, xSizeBig + 2 * GlowRange, 379 377 ySizeBig + 2 * GlowRange, Canvas, -
trunk/Packages/CevoComponents/EOTButton.pas
r208 r323 74 74 begin 75 75 with Canvas do 76 if FGraphic <> nil then 77 begin 78 // TODO: For some reason BitBlt is not working with gray background here 79 //BitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0); 80 Buffer.Canvas.Draw(0, 0, Back); 76 if FGraphic <> nil then begin 77 UnshareBitmap(Buffer); 78 BitBltCanvas(Buffer.Canvas, 0, 0, 48, 48, Back.Canvas, 0, 0); 81 79 ImageOp_CBC(Buffer, Template, 0, 0, 133, 149 + 48 * Byte(FDown), 48, 48, 82 80 $000000, $FFFFFF); … … 85 83 $000000, $FFFFFF); 86 84 BitBltCanvas(Canvas, 0, 0, 48, 48, Buffer.Canvas, 0, 0); 87 end 88 else 89 begin 85 end else begin 90 86 Brush.Color := $0000FF; 91 87 FrameRect(Rect(0, 0, 48, 48)) -
trunk/Packages/CevoComponents/ScreenTools.pas
r318 r323 109 109 function ScaleToNative(Value: Integer): Integer; 110 110 function ScaleFromNative(Value: Integer): Integer; 111 procedure UnshareBitmap(Bitmap: TBitmap); 111 112 112 113 const … … 1514 1515 procedure PaintLogo(Canvas: TCanvas; X, Y, LightColor, ShadeColor: Integer); 1515 1516 begin 1516 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 1517 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 1517 UnshareBitmap(LogoBuffer); 1518 1518 BitBltCanvas(LogoBuffer.Canvas, 0, 0, Logo.Width, Logo.Height, Canvas, X, Y); 1519 1519 ImageOp_BCC(LogoBuffer, Templates.Data, Point(0, 0), Logo.BoundsRect, … … 1626 1626 begin 1627 1627 Result := Value; 1628 end; 1629 1630 procedure UnshareBitmap(Bitmap: TBitmap); 1631 begin 1632 // FillRect cause image data to be freed so subsequent BitBlt can access valid image data 1633 Bitmap.Canvas.FillRect(0, 0, 0, 0); 1628 1634 end; 1629 1635 -
trunk/Start.pas
r320 r323 503 503 $000000, xAction, y + 21, Phrases2.Lookup(TextItem)); 504 504 505 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 506 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 505 UnshareBitmap(LogoBuffer); 507 506 BitBltCanvas(LogoBuffer.Canvas, 0, 0, 50, 50, Canvas, 508 507 xActionIcon - 2, y - 2); … … 603 602 604 603 // Paint menu logo 605 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 606 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height); 604 UnshareBitmap(LogoBuffer); 607 605 BitBltCanvas(LogoBuffer.Canvas, 0, 0, MenuLogo.Width, MenuLogo.Height, Canvas, 6, 608 606 3 + 2 * integer(Tab <> tbMain)); … … 627 625 h := ClientHeight - ActionBottomBorder - 628 626 (yAction + Integer(SelectedAction) * ActionPitch - 8); 629 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 630 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);627 628 UnshareBitmap(LogoBuffer); 631 629 BitBltCanvas(LogoBuffer.Canvas, 0, 0, w, h, Canvas, 632 630 ActionSideBorder + i * wBuffer, yAction + Integer(SelectedAction) * ActionPitch … … 653 651 Format(Phrases2.Lookup('ACTIONHEADER_WEB'), [CevoHomepageShort])); 654 652 Canvas.Font.Assign(UniFont[ftNormal]); 655 // TODO: Explicitly clear background to black but in fact BitBlt SRCCOPY should do it 656 LogoBuffer.Canvas.FillRect(0, 0, LogoBuffer.Width, LogoBuffer.Height);653 654 UnshareBitmap(LogoBuffer); 657 655 BitBltCanvas(LogoBuffer.Canvas, 0, 0, LinkArrows.Width, LinkArrows.Height, Canvas, 658 656 xActionIcon, y + 2);
Note:
See TracChangeset
for help on using the changeset viewer.