Changeset 190 for trunk/Packages/CevoComponents/ScreenTools.pas
- Timestamp:
- May 7, 2020, 10:33:59 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/CevoComponents/ScreenTools.pas
r189 r190 81 81 function SetMainTextureByAge(Age: integer): boolean; 82 82 procedure LoadPhrases; 83 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer); 83 84 84 85 const … … 1398 1399 end; 1399 1400 1401 procedure Texturize(Dest, Texture: TBitmap; TransparentColor: Integer); 1402 var 1403 SrcPixel, DstPixel: TPixelPointer; 1404 X, Y: Integer; 1405 TexWidth, TexHeight: Integer; 1406 begin 1407 // texturize background 1408 Dest.BeginUpdate; 1409 TexWidth := Texture.Width; 1410 TexHeight := Texture.Height; 1411 DstPixel.Init(Dest); 1412 SrcPixel.Init(Texture); 1413 for Y := 0 to Dest.Height - 1 do begin 1414 for X := 0 to Dest.Width - 1 do begin 1415 if (DstPixel.Pixel^.ARGB and $FFFFFF) = TransparentColor then begin 1416 SrcPixel.SetXY(X mod TexWidth, Y mod TexHeight); 1417 DstPixel.Pixel^.B := SrcPixel.Pixel^.B; 1418 DstPixel.Pixel^.G := SrcPixel.Pixel^.G; 1419 DstPixel.Pixel^.R := SrcPixel.Pixel^.R; 1420 end; 1421 DstPixel.NextPixel; 1422 end; 1423 DstPixel.NextLine; 1424 end; 1425 Dest.EndUpdate; 1426 end; 1427 1400 1428 procedure LoadFonts; 1401 1429 var
Note:
See TracChangeset
for help on using the changeset viewer.