Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var
- c, t: TCanvas;
- l, h, w, i, ii, b: Integer;
- begin
- Writeln('Begin');
- l := Round(Sqrt(50));
- h := Round(200.0 / ((Sqrt(50.0) * 2.0) + 20.0)) - 1;
- w := Round(200.0 / (Sqrt(50.0) * 2.0)) - 1;
- b := BitmapFromString(15, 25, '');
- FastDrawClear(b, clWhite);
- t := GetBitmapCanvas(b);
- t.Pen.Color := clBlack;
- t.Pen.Width := 0;
- t.Brush.Color := clRed;
- t.Polygon([Point(l, 0), Point(0, l), Point(0, l + 10), Point(l, (2 * l) + 10), Point(2 * l, l + 10), Point(2 * l, l), Point(l, 0)]);
- l := BitmapFromString(200, 200, '');
- FastDrawClear(l, clWhite);
- SetTransparentColor(b, clWhite);
- for i := 0 to h do
- for ii := 0 to w do
- begin
- FastDrawTransparent(Round(ii * 2.0 * Sqrt(50.0)), Round(i * ((Sqrt(50.0) * 2.0) + 20.0)), b, l);
- if (i < h) and (ii < w) then
- FastDrawTransparent(Round(ii * 2.0 * Sqrt(50.0)) + Round(Sqrt(50)), Round(i * ((Sqrt(50.0) * 2.0) + 20.0)) + Round(Sqrt(50)) + 10, b, l);
- end;
- DisplayDebugImgWindow(200, 200);
- c := GetDebugCanvas;
- c.Brush.Color := clWhite;
- c.Rectangle(0, 0, 110, 110);
- SafeDrawBitmap(l, c, 0, 0);
- Writeln('End.');
- end.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement