Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- procedure DrawSomethingDunDunDun(var img: TImage; wl, hl: Integer);
- var
- a, b, x, y, ws, hs: Integer;
- ex, ey: Extended;
- begin
- with img.Canvas do
- begin
- ws := img.Width / wl;
- hs := img.Height / hl;
- Pen.Color := clBlack;
- for b := 0 to hl - 1 do
- begin
- for a := 1 to wl do
- begin
- ex := (a * ws) - (ws / 2);
- ey := (b * hs) + (b * (hs / 3));
- x := Round(ex);
- y := Round(ey);
- MoveTo(x, y);
- DecEx(ex, ws / 2);
- IncEx(ey, hs / 3);
- x := Round(ex);
- y := Round(ey);
- LineTo(x, y);
- IncEx(ey, hs / 3);
- y := Round(ey);
- LineTo(x, y);
- IncEx(ex, ws / 2);
- IncEx(ey, hs / 3);
- x := Round(ex);
- y := Round(ey);
- LineTo(x, y);
- IncEx(ey, hs / 3);
- y := Round(ey);
- LineTo(x, y);
- DecEx(ey, hs / 3);
- y := Round(ey);
- MoveTo(x, y);
- IncEx(ex, ws / 2);
- DecEx(ey, hs / 3);
- x := Round(ex);
- y := Round(ey);
- LineTo(x, y);
- DecEx(ey, hs / 3);
- y := Round(ey);
- LineTo(x, y);
- DecEx(ex, ws / 2);
- DecEx(ey, hs / 3);
- x := Round(ex);
- y := Round(ey);
- LineTo(x, y);
- end;
- end;
- end;
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement