Go to the documentation of this file.
3 #include "QInputDialog"
15 void IntelliToolCircle::drawCircle(
int radius){
16 int outer = radius+20;
19 int yMin, yMax, xMin, xMax;
20 yMin = centerPoint.y()-radius;
21 yMax = centerPoint.y()+radius;
23 for(
int i=yMin; i<=yMax; i++) {
24 xMin = static_cast<int>(centerPoint.x()-sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
25 xMax = static_cast<int>(centerPoint.x()+sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
31 yMin = (centerPoint.y()-radius);
32 yMax = (centerPoint.y()+radius);
33 for(
int i=yMin; i<=yMax; i++) {
34 xMin = static_cast<int>(centerPoint.x()-sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
35 xMax = static_cast<int>(centerPoint.x()+sqrt(pow(radius,2)-pow(i-centerPoint.y(),2)));
40 xMin = (centerPoint.x()-radius);
41 xMax = (centerPoint.x()+radius);
42 for(
int i=xMin; i<=xMax; i++) {
43 int yMin = static_cast<int>(centerPoint.y()-sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
44 int yMax = static_cast<int>(centerPoint.y()+sqrt(pow(radius,2)-pow(i-centerPoint.x(),2)));
60 this->centerPoint=QPoint(x,y);
79 int radius = static_cast<int>(sqrt(pow((centerPoint.x()-x),2)+pow((centerPoint.y()-y),2)));
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.
QColor getSecondColor()
A function to read the secondary selected color.
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.
QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
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.