paint.
setRenderHint(QPainter::Antialiasing,
true);
paint.translate(width()/2, height()/2);
paint.
setBrush(QColor(0,
255,
0,
127));
paint4.setFillRule(Qt::WindingFill);
paint4.moveTo(300,150);
paint4.arcTo(0,0,600,300,10,45);
paint4.lineTo(300,150);
paint4.lineTo(300,180);
paint4.arcTo(0,30,600,300,10,45);
paint4.lineTo(300,180);
int xw2 = 300 * cos(55*(M_PI/180));
int yw2 = -150 * sin(55*(M_PI/180));
xw2+=300;
yw2+=150;
paint5.moveTo(xw2,yw2);
paint5.lineTo(xw2,yw2+30);
paint4.addPath(paint5);
int xw = 300 * cos(10*(M_PI/180));
int yw = -150 * sin(10*(M_PI/180));
xw+=300;
yw+=150;
paint6.moveTo(xw,yw);
paint6.lineTo(xw,yw+30);
paint4.addPath(paint6);
paint.drawPath(paint4);
QPainter paint(this);
paint.setRenderHint(QPainter::Antialiasing,true);
paint.translate(width()/2, height()/2);
paint.setBrush(QColor(0,255,0,127));
QPainterPath paint4;
paint4.setFillRule(Qt::WindingFill);
paint4.moveTo(300,150);
paint4.arcTo(0,0,600,300,10,45);
paint4.lineTo(300,150);
paint4.lineTo(300,180);
paint4.arcTo(0,30,600,300,10,45);
paint4.lineTo(300,180);
int xw2 = 300 * cos(55*(M_PI/180));
int yw2 = -150 * sin(55*(M_PI/180));
xw2+=300;
yw2+=150;
QPainterPath paint5;
paint5.moveTo(xw2,yw2);
paint5.lineTo(xw2,yw2+30);
paint4.addPath(paint5);
int xw = 300 * cos(10*(M_PI/180));
int yw = -150 * sin(10*(M_PI/180));
xw+=300;
yw+=150;
QPainterPath paint6;
paint6.moveTo(xw,yw);
paint6.lineTo(xw,yw+30);
paint4.addPath(paint6);
paint.drawPath(paint4);
To copy to clipboard, switch view to plain text mode
Bookmarks