647 } |
647 } |
648 |
648 |
649 if (gl_drawangles) |
649 if (gl_drawangles) |
650 { QLineF l0 (poly[h], poly[i]), |
650 { QLineF l0 (poly[h], poly[i]), |
651 l1 (poly[i], poly[j]); |
651 l1 (poly[i], poly[j]); |
|
652 |
652 double angle = 180 - l0.angleTo (l1); |
653 double angle = 180 - l0.angleTo (l1); |
|
654 |
|
655 if (angle < 0) |
|
656 angle = 180 - l1.angleTo (l0); |
|
657 |
653 str label = str::number (angle) + str::fromUtf8 (QByteArray ("\302\260")); |
658 str label = str::number (angle) + str::fromUtf8 (QByteArray ("\302\260")); |
654 QPoint pos = poly[i]; |
659 QPoint pos = poly[i]; |
655 pos.setY (pos.y() + metrics.height()); |
660 pos.setY (pos.y() + metrics.height()); |
|
661 |
656 paint.drawText (pos, label); |
662 paint.drawText (pos, label); |
657 } |
663 } |
658 } |
664 } |
659 } |
665 } |
660 } |
666 } |