188 const QPointF& v0p, const QPointF& v1p) const |
188 const QPointF& v0p, const QPointF& v1p) const |
189 { |
189 { |
190 if (not m_config->drawLineLengths()) |
190 if (not m_config->drawLineLengths()) |
191 return; |
191 return; |
192 |
192 |
193 const QString label = QString::number ((v1 - v0).length(), 'f', 2); |
193 const QString label = QString::number(abs(v1 - v0), 'f', 2); |
194 QPoint origin = QLineF (v0p, v1p).pointAt (0.5).toPoint(); |
194 QPoint origin = QLineF (v0p, v1p).pointAt (0.5).toPoint(); |
195 painter.drawText (origin, label); |
195 painter.drawText (origin, label); |
196 } |
196 } |
197 |
197 |
198 void AbstractDrawMode::renderPolygon(QPainter& painter, const QVector<Vertex>& polygon3d, |
198 void AbstractDrawMode::renderPolygon(QPainter& painter, const QVector<Vertex>& polygon3d, |