The EllipseFigure class
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 ...
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.