📄 shapes.pas
字号:
unit Shapes;interfaceuses SysUtils, Classes, Types, QGraphics;type TGeoShape = class( TObject )
public
function Draw(): string;
end;
TGeoPoint = class( TGeoShape )
protected
FPoint: TPoint;
public
function Draw(): string; overload;
end;
TGeoLine = class( TGeoPoint )
protected
FToPoint: TPoint;
public
function Draw(): string; overload;
end;
TGeoRect = class( TGeoShape )
protected
FRect: TRect;
public
function Draw(): string; overload;
end;
{var Shape: TGeoShape; Point: TGeoPoint; Line: TGeoLine; Rect: TGeoRect;}implementation{ TGeoShape }function TGeoShape.Draw: string;begin Result := 'TGeoShape.Draw called.';end;{ TGeoPoint }function TGeoPoint.Draw: string;begin Result := 'TGeoPoint.Draw called.';end;{ TGeoLine }function TGeoLine.Draw: string;begin Result := 'TGeoLine.Draw called.';end;{ TGeoRect }function TGeoRect.Draw: string;begin Result := 'TGeoLine.Draw called.';end;end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -