Сообщество IT-специалистов
Ответы на любые вопросы об IT
Профессиональное развитие в IT
Удаленная работа для IT-специалистов
inline void QPainter::drawLine(const QLineF &l) { drawLines(&l, 1); }
void QPainter::drawLines(const QLineF *lines, int lineCount) { #ifdef QT_DEBUG_DRAW if (qt_show_painter_debug_output) printf("QPainter::drawLines(), line count=%d\n", lineCount); #endif Q_D(QPainter); if (!d->engine || lineCount < 1) return; if (d->extended) { d->extended->drawLines(lines, lineCount); return; } d->updateState(d->state); uint lineEmulation = line_emulation(d->state->emulationSpecifier); if (lineEmulation) { if (lineEmulation == QPaintEngine::PrimitiveTransform && d->state->matrix.type() == QTransform::TxTranslate) { for (int i = 0; i < lineCount; ++i) { QLineF line = lines[i]; line.translate(d->state->matrix.dx(), d->state->matrix.dy()); d->engine->drawLines(&line, 1); } } else { QPainterPath linePath; for (int i = 0; i < lineCount; ++i) { linePath.moveTo(lines[i].p1()); linePath.lineTo(lines[i].p2()); } d->draw_helper(linePath, QPainterPrivate::StrokeDraw); } return; } d->engine->drawLines(lines, lineCount); }