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

void QPainterPath::lineTo ( const QPointF endPoint  ) 

Adds a straight line from the current position to the given endPoint. After the line is drawn, the current position is updated to be at the end point of the line.

See also:
addPolygon(), addRect(), {QPainterPath::Composing a QPainterPath}{Composing a QPainterPath}

Definition at line 664 of file qpainterpath.cpp.

References QPointF::x(), and QPointF::y().

Referenced by arcTo(), DiagramItem::DiagramItem(), QPlastiqueStyle::drawComplexControl(), QPainter::drawConvexPolygon(), QPainter::drawLines(), QPainter::drawPoints(), QPainter::drawPolygon(), QPainter::drawPolyline(), QCommonStyle::drawPrimitive(), BasicToolsPlugin::generateShape(), lineTo(), NorwegianWoodStyle::roundRectPath(), Window::setupShapes(), QGraphicsLineItem::shape(), SortingBox::SortingBox(), and toReversed().

#ifdef QPP_DEBUG
    printf("QPainterPath::lineTo() (%.2f,%.2f)\n", p.x(), p.y());
#ifndef QT_NO_DEBUG
    if (qt_is_nan(p.x()) || qt_is_nan(p.y()))
        qWarning("QPainterPath::lineTo: Adding point where x or y is NaN, results are undefined");

    QPainterPathData *d = d_func();
    if (p == QPointF(d->elements.last()))
    Element elm = { p.x(), p.y(), LineToElement };

Generated by  Doxygen 1.6.0   Back to index