diff options
author | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-01 07:57:03 (GMT) |
---|---|---|
committer | Laszlo Agocs <laszlo.p.agocs@nokia.com> | 2011-03-01 07:57:03 (GMT) |
commit | e538957c77f71b1cc38a3c43c9f3157f65a3ff11 (patch) | |
tree | 3d013b12ba28668d127fe5532de5fc588fe63cb0 /src/gui/painting | |
parent | 67d5513b5aca096dfc33952cf81219087b0e41b0 (diff) | |
parent | 2653c4fcf42ec93db16a299c29c9fe0f98680c75 (diff) | |
download | Qt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.zip Qt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.tar.gz Qt-e538957c77f71b1cc38a3c43c9f3157f65a3ff11.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts:
src/s60installs/bwins/QtGuiu.def
src/s60installs/eabi/QtGuiu.def
Diffstat (limited to 'src/gui/painting')
-rw-r--r-- | src/gui/painting/qbrush.cpp | 8 | ||||
-rw-r--r-- | src/gui/painting/qcolor.cpp | 4 | ||||
-rw-r--r-- | src/gui/painting/qgraphicssystem_runtime.cpp | 1 | ||||
-rw-r--r-- | src/gui/painting/qpaintengine_raster.cpp | 7 | ||||
-rw-r--r-- | src/gui/painting/qpainter.cpp | 12 | ||||
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 18 |
6 files changed, 29 insertions, 21 deletions
diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index 81a62b0..dc61e34 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1208,14 +1208,14 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) Each of the types is represented by a subclass of QGradient: \table - \row - \o \inlineimage qgradient-linear.png - \o \inlineimage qgradient-radial.png - \o \inlineimage qgradient-conical.png \header \o QLinearGradient \o QRadialGradient \o QConicalGradient + \row + \o \inlineimage qgradient-linear.png + \o \inlineimage qgradient-radial.png + \o \inlineimage qgradient-conical.png \endtable The colors in a gradient are defined using stop points of the diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp index dea3a72..8ebbe35 100644 --- a/src/gui/painting/qcolor.cpp +++ b/src/gui/painting/qcolor.cpp @@ -78,12 +78,12 @@ QT_BEGIN_NAMESPACE names. \table + \header + \o RGB \o HSV \o CMYK \row \o \inlineimage qcolor-rgb.png \o \inlineimage qcolor-hsv.png \o \inlineimage qcolor-cmyk.png - \header - \o RGB \o HSV \o CMYK \endtable The QColor constructor creates the color based on RGB values. To diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 0294c4b..5841d40 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -285,6 +285,7 @@ void QRuntimeWindowSurface::flush(QWidget *widget, const QRegion ®ion, void QRuntimeWindowSurface::setGeometry(const QRect &rect) { + QWindowSurface::setGeometry(rect); m_windowSurface->setGeometry(rect); } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 682731a..ba618ea 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3706,6 +3706,13 @@ void QRasterPaintEnginePrivate::rasterizeLine_dashed(QLineF line, const bool squareCap = (pen.capStyle() == Qt::SquareCap); const QVector<qreal> pattern = pen.dashPattern(); + qreal patternLength = 0; + for (int i = 0; i < pattern.size(); ++i) + patternLength += pattern.at(i); + + if (patternLength <= 0) + return; + qreal length = line.length(); Q_ASSERT(length > 0); while (length > 0) { diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index a32443f..76ac7db 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -1113,14 +1113,14 @@ void QPainterPrivate::updateState(QPainterState *newState) the range of available patterns. \table - \row - \o \inlineimage qpainter-vectordeformation.png - \o \inlineimage qpainter-gradients.png - \o \inlineimage qpainter-pathstroking.png \header \o \l {demos/deform}{Vector Deformation} \o \l {demos/gradients}{Gradients} \o \l {demos/pathstroke}{Path Stroking} + \row + \o \inlineimage qpainter-vectordeformation.png + \o \inlineimage qpainter-gradients.png + \o \inlineimage qpainter-pathstroking.png \endtable @@ -1193,13 +1193,13 @@ void QPainterPrivate::updateState(QPainterState *newState) coordinate transformations. \table + \header + \o nop \o rotate() \o scale() \o translate() \row \o \inlineimage qpainter-clock.png \o \inlineimage qpainter-rotation.png \o \inlineimage qpainter-scale.png \o \inlineimage qpainter-translation.png - \header - \o nop \o rotate() \o scale() \o translate() \endtable The most commonly used transformations are scaling, rotation, diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index 7ecf10a..9ef6955 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -240,12 +240,12 @@ static void qt_debug_path(const QPainterPath &path) provides two methods for filling paths: \table - \row - \o \inlineimage qt-fillrule-oddeven.png - \o \inlineimage qt-fillrule-winding.png \header \o Qt::OddEvenFill \o Qt::WindingFill + \row + \o \inlineimage qt-fillrule-oddeven.png + \o \inlineimage qt-fillrule-winding.png \endtable See the Qt::FillRule documentation for the definition of the @@ -315,12 +315,12 @@ static void qt_debug_path(const QPainterPath &path) QPainterPath to draw text. \table - \row - \o \inlineimage qpainterpath-example.png - \o \inlineimage qpainterpath-demo.png \header \o \l {painting/painterpaths}{Painter Paths Example} \o \l {demos/deform}{Vector Deformation Demo} + \row + \o \inlineimage qpainterpath-example.png + \o \inlineimage qpainterpath-demo.png \endtable \sa QPainterPathStroker, QPainter, QRegion, {Painter Paths Example} @@ -1245,12 +1245,12 @@ Qt::FillRule QPainterPath::fillRule() const fillRule. Qt provides two methods for filling paths: \table - \row - \o \inlineimage qt-fillrule-oddeven.png - \o \inlineimage qt-fillrule-winding.png \header \o Qt::OddEvenFill (default) \o Qt::WindingFill + \row + \o \inlineimage qt-fillrule-oddeven.png + \o \inlineimage qt-fillrule-winding.png \endtable \sa fillRule() |