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() ...
Get C++ Windows Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.