The ArrowFigure class
The ArrowFigure
is a subclass of the LineFigure
class and reuses the firstPoint
and lastPoint
fields and some of its functionality. The endpoints of the arrowhead are stored in the leftPoint
and rightPoint
fields, as shown in the following image. The lengths of the sides are defined by the ArrowLength
constant to 500 units, which is 5 millimeters.
The ArrowFigure
class overrides some of the methods of the LineFigure
class. Mostly, it calls the methods of the LineFigure
class and then adds functionality of its own.
ArrowFigure.h
class ArrowFigure : public LineFigure { public: ArrowFigure(const Window* windowPtr); FigureId GetId() const {return ArrowId;}; bool IsClick(Point mousePoint); bool IsInside(Rect area); void DoubleClick(Point mousePoint); void Modify(Size distanceSize); void Move(Size distanceSize); Rect Area() const; void Draw(Graphics&...