The EllipseFigure
class is a subclass of the RectangleFigure
class. The ellipse can be moved or reshaped by the horizontal or vertical corners. Most of the methods from the RectangleFigure
class are not overridden by the Ellipse
class.
Ellipse.h
class EllipseFigure : public RectangleFigure { public: EllipseFigure(const Window* windowPtr); FigureId GetId() const {return EllipseId;} bool IsClick(Point mousePoint); void Modify(Size distanceSize); void Draw(Graphics& graphics) const; CursoTyper GetCursor() const; private: enum {CreateEllipse, LeftPoint, TopPoint, RightPoint, BottomPoint, MoveEllipse} ellipseMode; };
Ellipse.cpp
#include "..\\SmallWindows\\SmallWindows.h" #include "Draw.h" #include "RectangleFigure.h" #include "EllipseFigure.h" EllipseFigure::EllipseFigure(const Window* windowPtr) :RectangleFigure(windowPtr...