Go to the documentation of this file.
3 #include "QInputDialog"
8 this->alphaInner = QInputDialog::getInt(
nullptr,
"Inner Alpha Value",
"Value:", 0,0,255,1);
9 this->edgeWidth = QInputDialog::getInt(
nullptr,
"Outer edge width",
"Value:", 0,1,255,1);
16 void IntelliToolCircle::drawCyrcle(
int radius){
17 int outer = radius+20;
19 inner.setAlpha(alphaInner);
20 int yMin, yMax, xMin, xMax;
21 yMin = Middle.y()-radius;
22 yMax = Middle.y()+radius;
24 for(
int i=yMin; i<=yMax; i++) {
25 xMin = Middle.x()-sqrt(pow(radius,2)-pow(i-Middle.y(),2));
26 xMax = Middle.x()+sqrt(pow(radius,2)-pow(i-Middle.y(),2));
31 radius = radius +(this->edgeWidth/2.)-1.;
32 yMin = (Middle.y()-radius);
33 yMax = (Middle.y()+radius);
34 for(
int i=yMin; i<=yMax; i++) {
35 xMin = Middle.x()-sqrt(pow(radius,2)-pow(i-Middle.y(),2));
36 xMax = Middle.x()+sqrt(pow(radius,2)-pow(i-Middle.y(),2));
41 xMin = (Middle.x()-radius);
42 xMax = (Middle.x()+radius);
43 for(
int i=xMin; i<=xMax; i++) {
44 int yMin = Middle.y()-sqrt(pow(radius,2)-pow(i-Middle.x(),2));
45 int yMax = Middle.y()+sqrt(pow(radius,2)-pow(i-Middle.x(),2));
61 this->Middle=QPoint(x,y);
73 this->edgeWidth+=value;
74 if(this->edgeWidth<=0) {
83 int radius = static_cast<int>(sqrt(pow((Middle.x()-x),2)+pow((Middle.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.