Version: svn_trunk (using KDE KDE 3.4.2) Installed from: Fedora RPMs OS: Linux It is impossible to draw an arrow that points to the left.
On Wednesday 14 December 2005 23:38, Matthew Truch wrote: > It is impossible to draw an arrow that points to the left. Known issue, but not entirely true. In fixing the mouse handling I had to break this. It's possible to rotate the arrow after it's drawn and given that we have so many other issues to solve for 1.2, I think we'll leave this for 1.2.1.
SVN commit 489017 by arwalker: BUG:118363 Allow arrows to be created in any orientation M +13 -5 kstgfxmousehandlerutils.cpp --- trunk/extragear/graphics/kst/kst/kstgfxmousehandlerutils.cpp #489016:489017 @@ -73,13 +73,21 @@ } } } - bool topLeft = (mouseOrigin.x() <= fakePos.x() && mouseOrigin.y() <= fakePos.y()) || (mouseOrigin.x() >= fakePos.x() && mouseOrigin.y() >= fakePos.y()); + QRect lineRect(mouseOrigin, fakePos); - QRect reduced = lineRect.normalize().intersect(boundingBox); - if (topLeft) { - return reduced; + QRect reduced = lineRect.normalize().intersect(boundingBox); + + lineRect = reduced; + if (mouseOrigin.x() > fakePos.x()) { + lineRect.setLeft(reduced.right()); + lineRect.setRight(reduced.left()); } - return QRect(reduced.bottomLeft(), reduced.topRight()); + if (mouseOrigin.y() > fakePos.y()) { + lineRect.setTop(reduced.bottom()); + lineRect.setBottom(reduced.top()); + } + + return lineRect; }