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

QPainterPath QPainterPathStroker::createStroke ( const QPainterPath path  )  const

Generates a new path that is a fillable area representing the outline of the given path.

The various design aspects of the outline are based on the stroker's properties: width(), capStyle(), joinStyle(), dashPattern(), curveThreshold() and miterLimit().

The generated path should only be used for outlining the given painter path. Otherwise it may cause unexpected behavior. Generated outlines also require the Qt::WindingFill rule which is set by default.

Definition at line 2382 of file qpainterpath.cpp.

References QPainterPath::setFillRule().

    QPainterPathStrokerPrivate *d = const_cast<QPainterPathStrokerPrivate *>(d_func());
    QPainterPath stroke;
    if (d->dashPattern.isEmpty()) {
        d->stroker.strokePath(path, &stroke, QMatrix());
    } else {
        QDashStroker dashStroker(&d->stroker);
        dashStroker.strokePath(path, &stroke, QMatrix());
    return stroke;

Generated by  Doxygen 1.6.0   Back to index