[Kst] [Bug 130282] Start and end arrow scalings are mixed
Andrew Walker
arwalker at sumusltd.com
Wed Jul 5 20:14:03 CEST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=130282
arwalker sumusltd com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From arwalker sumusltd com 2006-07-05 20:14 -------
SVN commit 558623 by arwalker:
BUG:130282 Correctly scale start and end of arrow
M +4 -4 kstviewarrow.cpp
M +1 -1 kstviewarrow.h
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewarrow.cpp #558622:558623
@ -86,8 +86,8 @
}
-void KstViewArrow::paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w) {
- double deltax = _toArrowScaling * 2.0 * double(w);
+void KstViewArrow::paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w, double scaling) {
+ double deltax = scaling * 2.0 * double(w);
double theta = atan2(double(from.y() - to.y()), double(from.x() - to.x())) - M_PI / 2.0;
double sina = sin(theta);
double cosa = cos(theta);
@ -163,10 +163,10 @
p.setBrush(_foregroundColor);
if (_hasToArrow) {
- paintArrow(p, to, from, w);
+ paintArrow(p, to, from, w, _toArrowScaling);
}
if (_hasFromArrow) {
- paintArrow(p, from, to, w);
+ paintArrow(p, from, to, w, _fromArrowScaling);
}
}
p.restore();
--- trunk/extragear/graphics/kst/src/libkstapp/kstviewarrow.h #558622:558623
@ -42,7 +42,7 @
virtual KstViewObject* copyObjectQuietly(KstViewObject& parent, const QString& name = QString::null) const;
void paintSelf(KstPainter& p, const QRegion& bounds);
- void paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w);
+ void paintArrow(KstPainter& p, const QPoint& to, const QPoint &from, int w, double scaling);
// true if either end has an arrow
bool hasArrow() const;
More information about the Kst
mailing list