Changeset 323 for trunk/Packages/CevoComponents
- Timestamp:
- Mar 23, 2021, 2:46:42 PM (4 years ago)
- Location:
- trunk/Packages/CevoComponents
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
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
Note:
See TracChangeset
for help on using the changeset viewer.