summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 09:43:37 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-05-20 09:43:37 (GMT)
commit30ffe43f826baae366b6e745d077ade316512d3b (patch)
tree3e8c020ec99a5d69b9787a8d164a2f326936eebc /src/gui/painting
parente7989aeb09f7c597edf3498183bd97bd0122382b (diff)
parent99f6250a4ac031b70757442715b226bc339ab699 (diff)
downloadQt-30ffe43f826baae366b6e745d077ade316512d3b.zip
Qt-30ffe43f826baae366b6e745d077ade316512d3b.tar.gz
Qt-30ffe43f826baae366b6e745d077ade316512d3b.tar.bz2
Merge remote branch 'origin/4.7' into qt-master-from-4.7
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qcolor.cpp6
-rw-r--r--src/gui/painting/qdrawutil.cpp6
-rw-r--r--src/gui/painting/qmatrix.cpp8
-rw-r--r--src/gui/painting/qpaintengine_mac.cpp6
-rw-r--r--src/gui/painting/qpaintengine_mac_p.h3
-rw-r--r--src/gui/painting/qpainter.cpp43
-rw-r--r--src/gui/painting/qpainterpath.cpp4
-rw-r--r--src/gui/painting/qpolygon.cpp8
8 files changed, 42 insertions, 42 deletions
diff --git a/src/gui/painting/qcolor.cpp b/src/gui/painting/qcolor.cpp
index 08d5572..37d7fa3 100644
--- a/src/gui/painting/qcolor.cpp
+++ b/src/gui/painting/qcolor.cpp
@@ -133,7 +133,7 @@ QT_BEGIN_NAMESPACE
QColor is platform and device independent. The QColormap class
maps the color to the hardware.
- For more information about painting in general, see \l{The Paint
+ For more information about painting in general, see the \l{Paint
System} documentation.
\tableofcontents
@@ -2523,7 +2523,7 @@ QDebug operator<<(QDebug dbg, const QColor &c)
Writes the \a color to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &stream, const QColor &color)
{
@@ -2559,7 +2559,7 @@ QDataStream &operator<<(QDataStream &stream, const QColor &color)
Reads the \a color from the \a stream.
- \sa { Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &stream, QColor &color)
{
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index ef9b18c..3ce95ef 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1138,12 +1138,10 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
yTarget.resize(rows + 1);
bool oldAA = painter->testRenderHint(QPainter::Antialiasing);
- bool oldSmooth = painter->testRenderHint(QPainter::SmoothPixmapTransform);
if (painter->paintEngine()->type() != QPaintEngine::OpenGL
&& painter->paintEngine()->type() != QPaintEngine::OpenGL2
- && (oldSmooth || oldAA) && painter->combinedTransform().type() != QTransform::TxNone) {
+ && oldAA && painter->combinedTransform().type() != QTransform::TxNone) {
painter->setRenderHint(QPainter::Antialiasing, false);
- painter->setRenderHint(QPainter::SmoothPixmapTransform, false);
}
xTarget[0] = targetRect.left();
@@ -1354,8 +1352,6 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
if (oldAA)
painter->setRenderHint(QPainter::Antialiasing, true);
- if (oldSmooth)
- painter->setRenderHint(QPainter::SmoothPixmapTransform, true);
}
QT_END_NAMESPACE
diff --git a/src/gui/painting/qmatrix.cpp b/src/gui/painting/qmatrix.cpp
index 00f32f7..7746316 100644
--- a/src/gui/painting/qmatrix.cpp
+++ b/src/gui/painting/qmatrix.cpp
@@ -103,7 +103,7 @@ QT_BEGIN_NAMESPACE
coordinate system. The standard coordinate system of a
QPaintDevice has its origin located at the top-left position. The
\e x values increase to the right; \e y values increase
- downward. For a complete description, see the \l {The Coordinate
+ downward. For a complete description, see the \l {Coordinate
System}{coordinate system} documentation.
QPainter has functions to translate, scale, shear and rotate the
@@ -176,7 +176,7 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/matrix/matrix.cpp 2
\endtable
- \sa QPainter, QTransform, {The Coordinate System},
+ \sa QPainter, QTransform, {Coordinate System},
{demos/affine}{Affine Transformations Demo}, {Transformations Example}
*/
@@ -1135,7 +1135,7 @@ Q_GUI_EXPORT QPainterPath operator *(const QPainterPath &p, const QMatrix &m)
Writes the given \a matrix to the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QMatrix &m)
@@ -1161,7 +1161,7 @@ QDataStream &operator<<(QDataStream &s, const QMatrix &m)
Reads the given \a matrix from the given \a stream and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QMatrix &m)
diff --git a/src/gui/painting/qpaintengine_mac.cpp b/src/gui/painting/qpaintengine_mac.cpp
index 14ba94e..e5323d8 100644
--- a/src/gui/painting/qpaintengine_mac.cpp
+++ b/src/gui/painting/qpaintengine_mac.cpp
@@ -1390,7 +1390,11 @@ QCoreGraphicsPaintEngine::updateRenderHints(QPainter::RenderHints hints)
CGContextSetInterpolationQuality(d->hd, (hints & QPainter::SmoothPixmapTransform) ?
kCGInterpolationHigh : kCGInterpolationNone);
}
- CGContextSetShouldSmoothFonts(d->hd, hints & QPainter::TextAntialiasing);
+ bool textAntialiasing = (hints & QPainter::TextAntialiasing) == QPainter::TextAntialiasing;
+ if (!textAntialiasing || d->disabledSmoothFonts) {
+ d->disabledSmoothFonts = !textAntialiasing;
+ CGContextSetShouldSmoothFonts(d->hd, textAntialiasing);
+ }
}
/*
diff --git a/src/gui/painting/qpaintengine_mac_p.h b/src/gui/painting/qpaintengine_mac_p.h
index c9ab419..940b2bc 100644
--- a/src/gui/painting/qpaintengine_mac_p.h
+++ b/src/gui/painting/qpaintengine_mac_p.h
@@ -148,7 +148,7 @@ class QCoreGraphicsPaintEnginePrivate : public QPaintEnginePrivate
Q_DECLARE_PUBLIC(QCoreGraphicsPaintEngine)
public:
QCoreGraphicsPaintEnginePrivate()
- : hd(0), shading(0), stackCount(0), complexXForm(false)
+ : hd(0), shading(0), stackCount(0), complexXForm(false), disabledSmoothFonts(false)
{
}
@@ -168,6 +168,7 @@ public:
CGShadingRef shading;
int stackCount;
bool complexXForm;
+ bool disabledSmoothFonts;
enum { CosmeticNone, CosmeticTransformPath, CosmeticSetPenWidth } cosmeticPen;
// pixel and cosmetic pen size in user coordinates.
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 262c5ec..dd3584a 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -970,7 +970,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
devices. If the painter is active, device() returns the paint
device on which the painter paints, and paintEngine() returns the
paint engine that the painter is currently operating on. For more
- information, see \l {The Paint System} documentation.
+ information, see the \l {Paint System}.
Sometimes it is desirable to make someone else paint on an unusual
QPaintDevice. QPainter supports a static function to do this,
@@ -1015,7 +1015,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
\o viewport(), window(), worldTransform() make up the painter's coordinate
transformation system. For more information, see the \l
- {Coordinate Transformations} section and the \l {The Coordinate
+ {Coordinate Transformations} section and the \l {Coordinate
System} documentation.
\o hasClipping() tells whether the painter clips at all. (The paint
@@ -1222,7 +1222,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
All the tranformation operations operate on the transformation
worldTransform(). A matrix transforms a point in the plane to another
point. For more information about the transformation matrix, see
- the \l {The Coordinate System} and QTransform documentation.
+ the \l {Coordinate System} and QTransform documentation.
The setWorldTransform() function can replace or add to the currently
set worldTransform(). The resetTransform() function resets any
@@ -1244,7 +1244,7 @@ void QPainterPrivate::updateState(QPainterState *newState)
logical coordinates, and the worldTransform() is identical with the
transformation matrix.
- See also \l {The Coordinate System} documentation.
+ See also \l {Coordinate System}
\section1 Clipping
@@ -2880,8 +2880,7 @@ void QPainter::setClipRegion(const QRegion &r, Qt::ClipOperation op)
functions is safe.
For more information about the coordinate system, transformations
- and window-viewport conversion, see \l {The Coordinate System}
- documentation.
+ and window-viewport conversion, see \l {Coordinate System}.
\sa setWorldTransform(), QTransform
*/
@@ -2901,7 +2900,7 @@ void QPainter::setWorldMatrix(const QMatrix &matrix, bool combine)
preserve the properties of perspective transformations.
\sa {QPainter#Coordinate Transformations}{Coordinate Transformations},
- {The Coordinate System}
+ {Coordinate System}
*/
const QMatrix &QPainter::worldMatrix() const
@@ -3044,7 +3043,7 @@ void QPainter::setWorldMatrixEnabled(bool enable)
Returns true if world transformation is enabled; otherwise returns
false.
- \sa setWorldMatrixEnabled(), worldTransform(), {The Coordinate System}
+ \sa setWorldMatrixEnabled(), worldTransform(), {Coordinate System}
*/
bool QPainter::worldMatrixEnabled() const
@@ -3386,7 +3385,7 @@ void QPainter::drawPath(const QPainterPath &path)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 6
\endtable
- \sa drawLines(), drawPolyline(), {The Coordinate System}
+ \sa drawLines(), drawPolyline(), {Coordinate System}
*/
/*!
@@ -3433,7 +3432,7 @@ void QPainter::drawPath(const QPainterPath &path)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 7
\endtable
- \sa drawRects(), drawPolygon(), {The Coordinate System}
+ \sa drawRects(), drawPolygon(), {Coordinate System}
*/
/*!
@@ -3597,7 +3596,7 @@ void QPainter::drawRects(const QRect *rects, int rectCount)
Draws a single point at the given \a position using the current
pen's color.
- \sa {The Coordinate System}
+ \sa {Coordinate System}
*/
/*!
@@ -3619,7 +3618,7 @@ void QPainter::drawRects(const QRect *rects, int rectCount)
Draws the first \a pointCount points in the array \a points using
the current pen's color.
- \sa {The Coordinate System}
+ \sa {Coordinate System}
*/
void QPainter::drawPoints(const QPointF *points, int pointCount)
{
@@ -4225,7 +4224,7 @@ void QPainter::drawRoundRect(const QRectF &r, int xRnd, int yRnd)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 9
\endtable
- \sa drawPie(), {The Coordinate System}
+ \sa drawPie(), {Coordinate System}
*/
void QPainter::drawEllipse(const QRectF &r)
{
@@ -4355,7 +4354,7 @@ void QPainter::drawEllipse(const QRect &r)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 10
\endtable
- \sa drawPie(), drawChord(), {The Coordinate System}
+ \sa drawPie(), drawChord(), {Coordinate System}
*/
void QPainter::drawArc(const QRectF &r, int a, int alen)
@@ -4419,7 +4418,7 @@ void QPainter::drawArc(const QRectF &r, int a, int alen)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 11
\endtable
- \sa drawEllipse(), drawChord(), {The Coordinate System}
+ \sa drawEllipse(), drawChord(), {Coordinate System}
*/
void QPainter::drawPie(const QRectF &r, int a, int alen)
{
@@ -4488,7 +4487,7 @@ void QPainter::drawPie(const QRectF &r, int a, int alen)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 12
\endtable
- \sa drawArc(), drawPie(), {The Coordinate System}
+ \sa drawArc(), drawPie(), {Coordinate System}
*/
void QPainter::drawChord(const QRectF &r, int a, int alen)
{
@@ -4779,7 +4778,7 @@ void QPainter::drawLines(const QPoint *pointPairs, int lineCount)
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 13
\endtable
- \sa drawLines(), drawPolygon(), {The Coordinate System}
+ \sa drawLines(), drawPolygon(), {Coordinate System}
*/
void QPainter::drawPolyline(const QPointF *points, int pointCount)
{
@@ -4918,7 +4917,7 @@ void QPainter::drawPolyline(const QPoint *points, int pointCount)
\l{Qt::FillRule} for a more detailed description of these fill
rules.
- \sa drawConvexPolygon(), drawPolyline(), {The Coordinate System}
+ \sa drawConvexPolygon(), drawPolyline(), {Coordinate System}
*/
void QPainter::drawPolygon(const QPointF *points, int pointCount, Qt::FillRule fillRule)
{
@@ -5069,7 +5068,7 @@ void QPainter::drawPolygon(const QPoint *points, int pointCount, Qt::FillRule fi
On some platforms (e.g. X11), the drawConvexPolygon() function can
be faster than the drawPolygon() function.
- \sa drawPolygon(), drawPolyline(), {The Coordinate System}
+ \sa drawPolygon(), drawPolyline(), {Coordinate System}
*/
/*!
@@ -7112,7 +7111,7 @@ bool QPainter::viewTransformEnabled() const
The default window rectangle is the same as the device's
rectangle.
- \sa window(), viewTransformEnabled(), {The Coordinate
+ \sa window(), viewTransformEnabled(), {Coordinate
System#Window-Viewport Conversion}{Window-Viewport Conversion}
*/
@@ -7176,7 +7175,7 @@ QRect QPainter::window() const
The default viewport rectangle is the same as the device's
rectangle.
- \sa viewport(), viewTransformEnabled() {The Coordinate
+ \sa viewport(), viewTransformEnabled() {Coordinate
System#Window-Viewport Conversion}{Window-Viewport Conversion}
*/
@@ -7260,7 +7259,7 @@ QRect QPainter::viewport() const
Enables view transformations if \a enable is true, or disables
view transformations if \a enable is false.
- \sa viewTransformEnabled(), {The Coordinate System#Window-Viewport
+ \sa viewTransformEnabled(), {Coordinate System#Window-Viewport
Conversion}{Window-Viewport Conversion}
*/
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp
index f5a698e..ffd0d5c 100644
--- a/src/gui/painting/qpainterpath.cpp
+++ b/src/gui/painting/qpainterpath.cpp
@@ -2307,7 +2307,7 @@ QPainterPath &QPainterPath::operator-=(const QPainterPath &other)
Writes the given painter \a path to the given \a stream, and
returns a reference to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPainterPath &p)
{
@@ -2334,7 +2334,7 @@ QDataStream &operator<<(QDataStream &s, const QPainterPath &p)
Reads a painter path from the given \a stream into the specified \a path,
and returns a reference to the \a stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPainterPath &p)
{
diff --git a/src/gui/painting/qpolygon.cpp b/src/gui/painting/qpolygon.cpp
index b68314f..2fb52b5 100644
--- a/src/gui/painting/qpolygon.cpp
+++ b/src/gui/painting/qpolygon.cpp
@@ -719,7 +719,7 @@ QPolygon::operator QVariant() const
Writes the given \a polygon to the given \a stream, and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPolygon &a)
{
@@ -735,7 +735,7 @@ QDataStream &operator<<(QDataStream &s, const QPolygon &a)
Reads a polygon from the given \a stream into the given \a
polygon, and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPolygon &a)
{
@@ -755,7 +755,7 @@ QDataStream &operator>>(QDataStream &s, QPolygon &a)
Writes the given \a polygon to the given \a stream, and returns a
reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator<<(QDataStream &s, const QPolygonF &a)
@@ -776,7 +776,7 @@ QDataStream &operator<<(QDataStream &s, const QPolygonF &a)
Reads a polygon from the given \a stream into the given \a
polygon, and returns a reference to the stream.
- \sa {Format of the QDataStream Operators}
+ \sa {Serializing Qt Data Types}
*/
QDataStream &operator>>(QDataStream &s, QPolygonF &a)