Advertisement
COOL_IRON

copyrect_demo.pas

Nov 24th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 0.41 KB | None | 0 0
  1. procedure ImFill;
  2. begin
  3.   Window.Maximize;
  4.   var src := Picture.Create('pic.png');
  5.   var p := Picture.Create(180, 352);
  6.   p.CopyRect(Rect(0, 0, 180, 352), src, Rect(220, 64, 420, 416));
  7.   var (w, h) := (p.Width, p.Height);
  8.   var (x, y) := (0, 0);
  9.   loop Window.Height div h do
  10.   begin
  11.     loop Window.Width div w do
  12.     begin
  13.       p.Draw(x, y);
  14.       x += w;
  15.     end;
  16.     x := 0;
  17.     y += h;
  18.   end;
  19. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement