[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    qt-copy/patches
From:       Dirk Mueller <mueller () kde ! org>
Date:       2008-09-01 16:49:36
Message-ID: 1220287776.551397.4194.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 855880 by mueller:

updated patch


 M  +9 -19     0247-avoid-wiggly-line-crashes.diff  


--- trunk/qt-copy/patches/0247-avoid-wiggly-line-crashes.diff #855879:855880
@@ -1,8 +1,8 @@
-qt-bugs@ issue : none yet
+qt-bugs@ issue : N225275
 Trolltech task ID : none yet
 bugs.kde.org number : ?
 applied: no
-author: Dirk Mueller <mueller@kde.org>
+author: from Trolltech
 
 The generateWavyPath function produces NaN arc's when the minWidth 
 is negative. this apparently happens because textitems that do not
@@ -10,22 +10,12 @@
 
 --- src/gui/painting/qpainter.cpp
 +++ src/gui/painting/qpainter.cpp
-@@ -5174,6 +5174,8 @@ static QPainterPath generateWavyPath(qre
-     extern int qt_defaultDpi();
-     QPainterPath path;
+@@ -5188,7 +5188,7 @@ static QPainterPath generateWavyPath(qre
  
-+    Q_ASSERT(minWidth >= 0);
-+
-     bool up = true;
-     const qreal radius = 1.3 * device->logicalDpiY() / qt_defaultDpi();
-     qreal xs, ys;
-@@ -5423,7 +5425,8 @@ void QPainter::drawTextItem(const QPoint
-     } else {
-         d->engine->drawTextItem(p, ti);
-     }
--    drawTextItemDecoration(this, p, ti);
-+    if (ti.num_glyphs && ti.width.toReal() >= 0)
-+        drawTextItemDecoration(this, p, ti);
+         // cut-off at the last arc segment
+         if (remaining < 2 * radius)
+-            angle = 180 * acos(1 - remaining / radius) / Q_PI;
++            angle = 180 * remaining / (2 * radius);
  
-     if (d->state->renderHints != oldRenderHints) {
-         d->state->renderHints = oldRenderHints;
+         path.arcTo(xs, ys, 2*radius, 2*radius, 180, up ? angle : -angle);
+ 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic