Go to the documentation of this file.
3 #include "QInputDialog"
15 void IntelliToolCircle::drawCircle(
int radius){
18 int yMin, yMax, xMin, xMax;
19 yMin = centerPoint.y() - radius;
20 yMax = centerPoint.y() + radius;
22 for(
int i = yMin; i<=yMax; i++) {
23 xMin =
static_cast<int>(centerPoint.x() - sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
24 xMax =
static_cast<int>(centerPoint.x() + sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
30 yMin = (centerPoint.y() - radius);
31 yMax = (centerPoint.y() + radius);
32 for(
int i = yMin; i<=yMax; i++) {
33 xMin =
static_cast<int>(centerPoint.x() - sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
34 xMax =
static_cast<int>(centerPoint.x() + sqrt(pow(radius,2) - pow(i - centerPoint.y(),2)));
39 xMin = (centerPoint.x() - radius);
40 xMax = (centerPoint.x() + radius);
41 for(
int i = xMin; i<=xMax; i++) {
42 int yMin =
static_cast<int>(centerPoint.y() - sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
43 int yMax =
static_cast<int>(centerPoint.y() + sqrt(pow(radius,2) - pow(i - centerPoint.x(),2)));
60 this->centerPoint = QPoint(x,y);
80 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 function that draws a point between on a given point in a given color.
QColor getFirstColor()
A function to read the primary selected color.
The IntelliColorPicker manages the selected colors for one whole project.
IntelliImage * image
image - Stores the imageData of the current LayerObject.
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.