1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14:
| procedure TFrmMain.Permute(pRow1, pCol1, pRow2, pCol2, pSize : integer); var Height, Width : integer; begin if pSize = 500 then begin Height := 300 DIV Division; Width := 500 DIV Division; imgHelp.Height := Height; imgHelp.Width := Width; imgHelp.Canvas.CopyRect(Rect(0, 0, Width, Height), imgPuzzleBig.Canvas, Rect(pCol1*Width, pRow1*Height, (pCol1*Width)+Width, (pRow1*Height)+Height)); imgPuzzleBig.Canvas.CopyRect(Rect(pCol1*Width, pRow1*Height, (pCol1*Width)+Width, (pRow1*Height)+Height), imgPuzzleBig.Canvas, Rect(pCol2*Width, pRow2*Height, (pCol2*Width)+Width, (Row2*Height)+Height)); imgPuzzleBig.Canvas.CopyRect(Rect(pCol2*Width, pRow2*Height, (pCol2*Width)+Width, (pRow2*Height)+Height), imgHelp.Canvas, Rect(0, 0, Width, Height)); end; end; |