Changeset 659


Ignore:
Timestamp:
Jul 2, 2025, 10:47:22 PM (11 hours ago)
Author:
chronos
Message:
  • Fixed: Paint background texture if windows forcibly resized to bigger size.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CevoComponents/ScreenTools.pas

    r648 r659  
    12101210procedure PaintBackground(Canvas: TCanvas; Left, Top, Width, Height, FormWidth,
    12111211  FormHeight: Integer);
    1212 begin
    1213   Fill(Canvas, Left, Top, Width, Height, (MainTexture.Width - FormWidth) div
    1214     2, (MainTexture.Height - FormHeight) div 2);
     1212var
     1213  X, Y: Integer;
     1214  XX, YY: Integer;
     1215begin
     1216  if MainTexture.Height > 0 then YY := Trunc(Height / MainTexture.Height)
     1217    else YY := 0;
     1218  if MainTexture.Width > 0 then XX := Trunc(Width / MainTexture.Width)
     1219    else XX := 0;
     1220  for Y := 0 to YY do
     1221  for X := 0 to XX do
     1222  begin
     1223    Fill(Canvas, Left + X * MainTexture.Width, Top + Y * MainTexture.Height, Width, Height,
     1224      -(Left + X * MainTexture.Width), -(Top + Y * MainTexture.Height));
     1225  end;
    12151226end;
    12161227
Note: See TracChangeset for help on using the changeset viewer.