Changeset 684 for trunk/Packages/CevoComponents/ScreenTools.pas
- Timestamp:
- Jul 26, 2025, 10:38:53 PM (14 hours ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ScreenTools.pas
r666 r684 1123 1123 1124 1124 procedure Fill(Canvas: TCanvas; Left, Top, Width, Height, xOffset, yOffset: Integer); 1125 begin 1126 //Assert((Left + xOffset >= 0) and (Left + xOffset + Width <= MainTexture.Width) and 1127 // (Top + yOffset >= 0) and (Top + yOffset + Height <= MainTexture.Height)); 1128 BitBltCanvas(Canvas, Left, Top, Width, Height, MainTexture.Image.Canvas, 1129 Left + xOffset, Top + yOffset); 1125 var 1126 X, Y: Integer; 1127 XX, YY: Integer; 1128 W, H: Integer; 1129 begin 1130 // BitBltCanvas(Canvas, Left, Top, Width, Height, MainTexture.Image.Canvas, 1131 // Left + xOffset, Top + yOffset); 1132 if Width < MainTexture.Width then W := Width 1133 else W := MainTexture.Width; 1134 if Height < MainTexture.Height then H := Height 1135 else H := MainTexture.Height; 1136 if MainTexture.Height > 0 then YY := Trunc(Height / MainTexture.Height) 1137 else YY := 0; 1138 if MainTexture.Width > 0 then XX := Trunc(Width / MainTexture.Width) 1139 else XX := 0; 1140 for Y := 0 to YY do 1141 for X := 0 to XX do 1142 begin 1143 BitBltCanvas(Canvas, Left + X * MainTexture.Width, Top + Y * MainTexture.Height, 1144 W, H, MainTexture.Image.Canvas, 0, 0); 1145 end; 1130 1146 end; 1131 1147 … … 1212 1228 procedure PaintBackground(Canvas: TCanvas; Left, Top, Width, Height, FormWidth, 1213 1229 FormHeight: Integer); 1214 var 1215 X, Y: Integer; 1216 XX, YY: Integer; 1217 begin 1218 if MainTexture.Height > 0 then YY := Trunc(Height / MainTexture.Height) 1219 else YY := 0; 1220 if MainTexture.Width > 0 then XX := Trunc(Width / MainTexture.Width) 1221 else XX := 0; 1222 for Y := 0 to YY do 1223 for X := 0 to XX do 1224 begin 1225 Fill(Canvas, Left + X * MainTexture.Width, Top + Y * MainTexture.Height, Width, Height, 1226 -(Left + X * MainTexture.Width), -(Top + Y * MainTexture.Height)); 1227 end; 1230 begin 1231 Fill(Canvas, Left, Top, Width, Height, 0, 0) 1228 1232 end; 1229 1233
Note:
See TracChangeset
for help on using the changeset viewer.