// draw the controller with all its arcs
void ArcBall::draw (double aspect)
{
	if(dragging)
		drawOuterRing();  // draw edges
 
	drawResultArc();
	drawConstraints();
	drawDragArc();
}
예제 #2
0
void ColorWheel::paintEvent(QPaintEvent*) {
    QPainter painter(this);
    painter.setRenderHint(QPainter::Antialiasing);

    QStyleOption opt;    
    opt.initFrom(this);
    // use the following lines to obtain the background color of the widget
    //QBrush background = opt.palette.window();
    //wheel.fill(background.color());

    drawOuterRing(painter);
    painter.drawImage(squareRegion_.boundingRect(), squareImage_);

    drawIndicator(painter);
    drawPicker(painter);

    style()->drawPrimitive(QStyle::PE_Widget, &opt, &painter, this);
}