Changeset 561 for trunk/Packages/CevoComponents/BaseWin.pas
- Timestamp:
- Apr 28, 2024, 12:39:51 AM (7 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/BaseWin.pas
r558 r561 476 476 477 477 procedure CreateOffscreen(var Offscreen: TBitmap); 478 begin 479 if Offscreen <> nil then 480 Exit; 481 Offscreen := TBitmap.Create; 482 Offscreen.PixelFormat := TPixelFormat.pf24bit; 483 if Screen.Height - yUnused < 480 then 484 Offscreen.SetSize(Screen.Width, 480) 485 else 486 Offscreen.SetSize(Screen.Width, Screen.Height - yUnused); 487 Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height); 488 Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear; 478 var 479 NewWidth: Integer; 480 NewHeight: Integer; 481 begin 482 if not Assigned(Offscreen) then begin 483 Offscreen := TBitmap.Create; 484 Offscreen.PixelFormat := TPixelFormat.pf24bit; 485 end; 486 if Screen.Height - yUnused < 480 then begin 487 NewWidth := Screen.Width; 488 NewHeight := 480; 489 end else begin 490 NewWidth := Screen.Width; 491 NewHeight := Screen.Height - yUnused; 492 end; 493 if (Offscreen.Width <> NewWidth) or (Offscreen.Height <> NewHeight) then begin 494 Offscreen.SetSize(NewWidth, NewHeight); 495 Offscreen.Canvas.FillRect(0, 0, Offscreen.Width, OffScreen.Height); 496 Offscreen.Canvas.Brush.Style := TBrushStyle.bsClear; 497 end; 489 498 end; 490 499
Note:
See TracChangeset
for help on using the changeset viewer.