Go to the documentation of this file.
10 PointIsNearStart =
false;
22 if(!isDrawing && x > 0 && y > 0 && x < width && y < height){
26 QPointList.push_back(drawingPoint);
32 else if(isDrawing && isNearStart(x,y,QPointList.front())){
33 PointIsNearStart = isNearStart(x,y,QPointList.front());
40 QPointList.push_back(drawingPoint);
48 PointIsNearStart =
false;
54 if(PointIsNearStart && QPointList.size() > 1){
56 PointIsNearStart =
false;
59 for(
int i = 0; i < width; i++){
60 for(
int j = 0; j < height; j++){
79 if(lineWidth + value < 10){
92 bool IntelliToolPolygon::isNearStart(
int x,
int y, QPoint Startpoint){
94 int StartX = Startpoint.x();
95 int StartY = Startpoint.y();
98 for(
int i = StartX - valueToNear; i < StartX + valueToNear; i++){
99 for(
int j = StartY - valueToNear; j < StartY + valueToNear; j++){
100 if((i == x) && (j == y)){
int getWidthActiveLayer()
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.
int getHeightActiveLayer()
virtual void drawPoint(const QPoint &p1, const QColor &color, const int &penWidth)
A.
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< Triangle > calculateTriangles(std::vector< QPoint > polyPoints)
A function to split a polygon in its spanning traingles by using Meisters Theorem of graph theory by ...
virtual void calculateVisiblity()=0
An abstract function that calculates the visiblity of the Image data if needed.
virtual void drawPlain(const QColor &color)
A function that clears the whole image in a given Color.