From 2778d2d6c0821a7a1622ca4312416739525781be Mon Sep 17 00:00:00 2001 From: Stefan Suhren Date: Sun, 17 May 2015 19:19:38 +0200 Subject: Add different shapes for drawing --- polygon.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 polygon.h (limited to 'polygon.h') diff --git a/polygon.h b/polygon.h new file mode 100644 index 0000000..54c8c4e --- /dev/null +++ b/polygon.h @@ -0,0 +1,22 @@ +#ifndef POLYGON_H +#define POLYGON_H + +#include + +#include "line.h" + +class Polygon : public Line +{ +public: + Polygon(); + + // Line interface +public: + virtual bool isHit(const QPoint &clickPoint); + virtual void draw(QPainter *painter); + +private: + QPolygon m_polygon; +}; + +#endif // POLYGON_H -- cgit v1.2.3-70-g09d2