Found it =)
procedure TBitmapEx.TileOnBmp (in AsphyreBmp.pas)
Code:
DestPoint.X:= ((PatternIndex mod ImgInRow) * OutPSize.X) + DestAdd.X;
DestPoint.Y:= (((PatternIndex div ImgInRow) mod ImgInCol) * OutPSize.Y) + DestAdd.Y;
SrcPoint.X:= ((SourcePattern mod PInRow) * InPSize.X) + SourceAdd.X;
SrcPoint.Y:= (((SourcePattern mod PInRow) mod PInCol) * InPSize.Y) + SourceAdd.Y;
the last line should be
Code:
SrcPoint.Y:= (((SourcePattern div PInRow) mod PInCol) * InPSize.Y) + SourceAdd.Y;
Bookmarks