diff options
author | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-18 10:39:47 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar@trolltech.com> | 2009-09-18 10:39:47 (GMT) |
commit | c1db7b5d8b7fb68b12c992cfa1953a599913851c (patch) | |
tree | d89826eb3d5ae0de3aac63f8e80f193c2baea0b2 /src/gui/painting | |
parent | dd3e430897a222ee9e3c7b923d094401fdeb72dd (diff) | |
parent | 6bd75e56853acce0b9d9fcc6fc162c546d217ab0 (diff) | |
download | Qt-c1db7b5d8b7fb68b12c992cfa1953a599913851c.zip Qt-c1db7b5d8b7fb68b12c992cfa1953a599913851c.tar.gz Qt-c1db7b5d8b7fb68b12c992cfa1953a599913851c.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/painting.pri | 1 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 2 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 6 | ||||
-rw-r--r-- | src/gui/painting/qrasterizer.cpp | 4 |
4 files changed, 10 insertions, 3 deletions
diff --git a/src/gui/painting/painting.pri b/src/gui/painting/painting.pri index 5abac2f..8343cb9 100644 --- a/src/gui/painting/painting.pri +++ b/src/gui/painting/painting.pri @@ -22,6 +22,7 @@ HEADERS += \ painting/qpainter_p.h \ painting/qpainterpath.h \ painting/qpainterpath_p.h \ + painting/qvectorpath_p.h \ painting/qpathclipper_p.h \ painting/qpdf_p.h \ painting/qpen.h \ diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index bac0a76..f41d7b4 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3551,7 +3551,7 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line, if (dash >= length) { dash = length; - *dashOffset += dash; + *dashOffset += dash / width; length = 0; } else { *dashOffset = 0; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index ebaa901..ed1b5d1 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7464,7 +7464,11 @@ void qt_format_text(const QFont &fnt, const QRectF &_r, bool hidemnmemonic = (tf & Qt::TextHideMnemonic); Qt::LayoutDirection layout_direction; - if(option) + if (tf & Qt::TextForceLeftToRight) + layout_direction = Qt::LeftToRight; + else if (tf & Qt::TextForceRightToLeft) + layout_direction = Qt::RightToLeft; + else if (option) layout_direction = option->textDirection(); else if (painter) layout_direction = painter->layoutDirection(); diff --git a/src/gui/painting/qrasterizer.cpp b/src/gui/painting/qrasterizer.cpp index 0b33369..66d0c9d 100644 --- a/src/gui/painting/qrasterizer.cpp +++ b/src/gui/painting/qrasterizer.cpp @@ -707,10 +707,12 @@ void QRasterizer::rasterizeLine(const QPointF &a, const QPointF &b, qreal width, if (a == b || width == 0 || d->clipRect.isEmpty()) return; + Q_ASSERT(width > 0.0); + QPointF pa = a; QPointF pb = b; - QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; + QPointF offs = QPointF(qAbs(b.y() - a.y()), qAbs(b.x() - a.x())) * width * 0.5; if (squareCap) offs += QPointF(offs.y(), offs.x()); const QRectF clip(d->clipRect.topLeft() - offs, d->clipRect.bottomRight() + QPoint(1, 1) + offs); |