Summary: | Start and end arrow scalings are mixed | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Nicolas Brisset <nicolas.brisset> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Solaris | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Nicolas Brisset
2006-07-05 10:02:17 UTC
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; |