Creation de la methode QET::correctAngle.

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/branches/0.3@813 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
xavier
2009-12-13 16:43:35 +00:00
parent b66f42e2ef
commit dbf3cda58f
3 changed files with 14 additions and 3 deletions

View File

@@ -199,9 +199,7 @@ void Terminal::paint(QPainter *p, const QStyleOptionGraphicsItem *options, QWidg
// orientations actuelle et par defaut de l'element
QET::Orientation ori_cur = elt -> orientation().current();
QET::Orientation ori_def = elt -> orientation().defaultOrientation();
applied_rotation = 90.0 * (ori_cur - ori_def);
while (applied_rotation < 360.0) applied_rotation += 360.0;
while (applied_rotation > 360.0) applied_rotation -= 360.0;
applied_rotation = QET::correctAngle(90.0 * (ori_cur - ori_def));
}
if (applied_rotation == 90.0) p -> translate(1.0, -1.0);
else if (applied_rotation == 180.0) p -> translate(-1.0, -1.0);