This repository has been archived on 2024-12-25. You can view files and clone it, but cannot push or open issues or pull requests.
2023-06-20 21:52:24 +03:00

24 lines
599 B
ObjectPascal
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// Штампы - это классы графических фигур, хранящие их параметры
// В любой момент можно нарисовать графическую фигуру, вызвав метод Stamp.
// Класс штампа прямоугольника
uses GraphABC;
type
RectangleStamp = auto class
x,y,w,h: integer;
procedure Stamp;
begin
Rectangle(x,y,x+w,y+h);
end;
end;
begin
var r := new RectangleStamp(30,30,50,50);
r.Stamp;
for var i:=1 to 10 do
begin
r.x := r.x + r.w +5;
r.Stamp;
end;
end.