Documentation

This commit is contained in:
Mienek
2019-12-19 12:05:31 +01:00
parent c6151b1bbf
commit 1de2f55e85
2 changed files with 48 additions and 4 deletions

View File

@@ -2,12 +2,20 @@
#define INTELLITOOLPOLYGON_H
#include "IntelliTool.h"
#include "IntelliHelper/IntelliHelper.h"
#include <vector>
#include <QPoint>
/*!
* \brief The IntelliToolPolygon managed the Drawing of Polygonforms
*/
class IntelliToolPolygon : public IntelliTool
{
public:
/*!
* \brief IntelliToolPolygon Constructor Define the Tool-intern Parameters
* \param Area
* \param colorPicker
*/
IntelliToolPolygon(PaintingArea* Area, IntelliColorPicker* colorPicker);
virtual void onMouseLeftPressed(int x, int y) override;
@@ -20,15 +28,51 @@ public:
virtual void onMouseMoved(int x, int y) override;
private:
/*!
* \brief isNearStart
* \param x
* \param y
* \param Startpoint
* \return true : Near Startpoint, else false
*/
bool isNearStart(int x, int y, QPoint Startpoint);
/*!
* \brief lineWidth of the Drawing Polygon
*/
int lineWidth;
/*!
* \brief width of the active Layer
*/
int width;
/*!
* \brief height of the active Layer
*/
int height;
/*!
* \brief isDrawing true while drawing, else false
*/
bool isDrawing;
/*!
* \brief PointIsNearStart true, when last click near Startpoint, else false
*/
bool PointIsNearStart;
/*!
* \brief drawingPoint Current Point after Left-Click
*/
QPoint drawingPoint;
/*!
* \brief Point Needed to look, if Point is in Polygon
*/
QPoint Point;
/*!
* \brief QPointList List of all Points of the Polygon
*/
std::vector<QPoint> QPointList;
/*!
* \brief Triangles Transformed QPointList into triangulated Form of the Polygon
*/
std::vector<Triangle> Triangles;
};