Logo Search packages:      
Sourcecode: qt4-x11 version File versions  Download package

void QPainter::strokePath ( const QPainterPath path,
const QPen pen 
) [inherited]

Draws the outline (strokes) the path path with the pen specified by pen

See also:
fillPath(), {QPainter::Drawing}{Drawing}

Definition at line 2276 of file qpainter.cpp.

References QPen::brush(), QPainter::drawPath(), and QPainter::isActive().

Referenced by QPainter::drawArc(), and QPicture::exec().

{
    if (!isActive())
        return;

    Q_D(QPainter);
    QBrush oldBrush = d->state->brush;
    QPen oldPen = d->state->pen;

    d->state->pen = pen;
    d->state->brush = Qt::NoBrush;
    d->engine->setDirty(QPaintEngine::DirtyFlags(QPaintEngine::DirtyPen | QPaintEngine::DirtyBrush));

    drawPath(path);

    // Reset old state
    d->state->pen = oldPen;
    d->state->brush = oldBrush;
    d->engine->setDirty(QPaintEngine::DirtyFlags(QPaintEngine::DirtyPen | QPaintEngine::DirtyBrush));
}


Generated by  Doxygen 1.6.0   Back to index