Go to the documentation of this file.
4 #include <QInputDialog>
9 isPointNearStart =
false;
31 if(isInside && !isDrawing) {
33 QPoint drawingPoint = QPoint(x,y);
36 QPointList.push_back(drawingPoint);
41 else if(isDrawing && isNearStart(x,y,QPointList.front())) {
42 if(QPointList.size() > 2) {
43 isPointNearStart =
true;
56 QPoint drawingPoint(x,y);
57 QPointList.push_back(drawingPoint);
66 isPointNearStart =
false;
72 if(isPointNearStart) {
74 isPointNearStart =
false;
88 for(
int i=0; i<static_cast<int>(QPointList.size()); i++) {
89 int next = static_cast<int>((i+static_cast<int>(1))%static_cast<int>(QPointList.size()));
112 bool IntelliToolPolygon::isNearStart(
int x,
int y, QPoint Startpoint){
114 int StartX = Startpoint.x();
115 int StartY = Startpoint.y();
118 for(
int i = StartX - valueToNear; i < StartX + valueToNear; i++) {
119 for(
int j = StartY - valueToNear; j < StartY + valueToNear; j++) {
120 if((i == x) && (j == y)) {
int getWidthOfActive()
The getWidthOfActive gets the horizontal dimensions of the active layer.
virtual void drawLine(const QPoint &p1, const QPoint &p2, const QColor &color, const int &penWidth)
A function that draws A Line between two given Points in a given color.
virtual void drawPixel(const QPoint &p1, const QColor &color)
A funtcion used to draw a pixel on the Image with the given Color.
std::vector< Triangle > calculateTriangles(std::vector< QPoint > polyPoints)
A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by ...
QColor getSecondColor()
A function to read the secondary selected color.
int getHeightOfActive()
The getHeightOfActive gets the vertical dimensions of the active layer.
The PaintingArea class manages the methods and stores information about the current painting area,...
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A.
IntelliImage::ImageType getTypeOfImageRealLayer()
bool isInPolygon(std::vector< Triangle > &triangles, QPoint &point)
A function to check if a point lies in a polygon by checking its spanning triangles.
QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
std::vector< QPoint > getPolygonDataOfRealLayer()
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.