summaryrefslogtreecommitdiffstats
path: root/src/gui/painting
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2010-03-09 11:26:51 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2010-03-09 11:28:12 (GMT)
commitbb966fe9dd8be25530da5a66727c7fe2123fafbb (patch)
treefccb9341ddc51d53b4b3dcd06e35c09420964bd1 /src/gui/painting
parent3b58b103bfa2e2b9bb12a042cbba36fb0a1baf9f (diff)
downloadQt-bb966fe9dd8be25530da5a66727c7fe2123fafbb.zip
Qt-bb966fe9dd8be25530da5a66727c7fe2123fafbb.tar.gz
Qt-bb966fe9dd8be25530da5a66727c7fe2123fafbb.tar.bz2
Renamed QPainter::Fragment/Hint -> QPainter::PixmapFragment/Hint
Reviewed-by: Kim
Diffstat (limited to 'src/gui/painting')
-rw-r--r--src/gui/painting/qdrawutil.cpp4
-rw-r--r--src/gui/painting/qpaintengineex.cpp4
-rw-r--r--src/gui/painting/qpaintengineex_p.h3
-rw-r--r--src/gui/painting/qpainter.cpp40
-rw-r--r--src/gui/painting/qpainter.h12
5 files changed, 32 insertions, 31 deletions
diff --git a/src/gui/painting/qdrawutil.cpp b/src/gui/painting/qdrawutil.cpp
index d76c709..a62f06b 100644
--- a/src/gui/painting/qdrawutil.cpp
+++ b/src/gui/painting/qdrawutil.cpp
@@ -1081,7 +1081,7 @@ void qDrawItem(QPainter *p, Qt::GUIStyle gs,
according to the \a margins structure.
*/
-typedef QVarLengthArray<QPainter::Fragment, 16> QPixmapFragmentsArray;
+typedef QVarLengthArray<QPainter::PixmapFragment, 16> QPixmapFragmentsArray;
/*!
\since 4.6
@@ -1102,7 +1102,7 @@ void qDrawBorderPixmap(QPainter *painter, const QRect &targetRect, const QMargin
const QPixmap &pixmap, const QRect &sourceRect,const QMargins &sourceMargins,
const QTileRules &rules, QDrawBorderPixmap::DrawingHints hints)
{
- QPainter::Fragment d;
+ QPainter::PixmapFragment d;
d.opacity = 1.0;
d.rotation = 0.0;
diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp
index 98762f0..1fd622d 100644
--- a/src/gui/painting/qpaintengineex.cpp
+++ b/src/gui/painting/qpaintengineex.cpp
@@ -970,8 +970,8 @@ void QPaintEngineEx::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con
fill(path, brush);
}
-void QPaintEngineEx::drawPixmapFragments(const QPainter::Fragment *fragments, int fragmentCount,
- const QPixmap &pixmap, QPainter::FragmentHints /*hints*/)
+void QPaintEngineEx::drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, QPainter::PixmapFragmentHints /*hints*/)
{
qreal oldOpacity = state()->opacity;
QTransform oldTransform = state()->matrix;
diff --git a/src/gui/painting/qpaintengineex_p.h b/src/gui/painting/qpaintengineex_p.h
index 2401b94..6c654bd 100644
--- a/src/gui/painting/qpaintengineex_p.h
+++ b/src/gui/painting/qpaintengineex_p.h
@@ -197,7 +197,8 @@ public:
virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s);
- virtual void drawPixmapFragments(const QPainter::Fragment *fragments, int fragmentCount, const QPixmap &pixmap, QFlags<QPainter::FragmentHint> hints);
+ virtual void drawPixmapFragments(const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap,
+ QFlags<QPainter::PixmapFragmentHint> hints);
virtual void updateState(const QPaintEngineState &state);
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index 9d83718..50279e4 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -8914,11 +8914,11 @@ QTransform QPainter::combinedTransform() const
This function is potentially faster than multiple calls to drawPixmap(),
since the backend can optimize state changes.
- \sa QPainter::Fragment, QPainter::FragmentHint
+ \sa QPainter::PixmapFragment, QPainter::PixmapFragmentHint
*/
-void QPainter::drawPixmapFragments(const Fragment *fragments, int fragmentCount,
- const QPixmap &pixmap, FragmentHints hints)
+void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, PixmapFragmentHints hints)
{
Q_D(QPainter);
@@ -8959,7 +8959,7 @@ void QPainter::drawPixmapFragments(const Fragment *fragments, int fragmentCount,
/*!
\since 4.7
- \class QPainter::Fragment
+ \class QPainter::PixmapFragment
\brief This class is used in conjunction with the
QPainter::drawPixmapFragments() function to specify how a pixmap, or
@@ -8980,73 +8980,73 @@ void QPainter::drawPixmapFragments(const Fragment *fragments, int fragmentCount,
/*!
\since 4.7
- This is a convenience function that returns a QPainter::Fragment that is
+ This is a convenience function that returns a QPainter::PixmapFragment that is
initialized with the \a pos, \a sourceRect, \a scaleX, \a scaleY, \a
rotation, \a opacity parameters.
*/
-QPainter::Fragment QPainter::Fragment::create(const QPointF &pos, const QRectF &sourceRect,
+QPainter::PixmapFragment QPainter::PixmapFragment::create(const QPointF &pos, const QRectF &sourceRect,
qreal scaleX, qreal scaleY, qreal rotation,
qreal opacity)
{
- Fragment fragment = {pos.x(), pos.y(), sourceRect.x(), sourceRect.y(), sourceRect.width(),
- sourceRect.height(), scaleX, scaleY, rotation, opacity};
+ PixmapFragment fragment = {pos.x(), pos.y(), sourceRect.x(), sourceRect.y(), sourceRect.width(),
+ sourceRect.height(), scaleX, scaleY, rotation, opacity};
return fragment;
}
/*!
- \variable QPainter::Fragment::x
+ \variable QPainter::PixmapFragment::x
\brief the x coordinate of center point in the target rectangle.
*/
/*!
- \variable QPainter::Fragment::y
+ \variable QPainter::PixmapFragment::y
\brief the y coordinate of the center point in the target rectangle.
*/
/*!
- \variable QPainter::Fragment::sourceLeft
+ \variable QPainter::PixmapFragment::sourceLeft
\brief the left coordinate of the source rectangle.
*/
/*!
- \variable QPainter::Fragment::sourceTop
+ \variable QPainter::PixmapFragment::sourceTop
\brief the top coordinate of the source rectangle.
*/
/*!
- \variable QPainter::Fragment::width
+ \variable QPainter::PixmapFragment::width
\brief the width of the source rectangle and is used to calculate the width
of the target rectangle.
*/
/*!
- \variable QPainter::Fragment::height
+ \variable QPainter::PixmapFragment::height
\brief the height of the source rectangle and is used to calculate the
height of the target rectangle.
*/
/*!
- \variable QPainter::Fragment::scaleX
+ \variable QPainter::PixmapFragment::scaleX
\brief the horizontal scale of the target rectangle.
*/
/*!
- \variable QPainter::Fragment::scaleY
+ \variable QPainter::PixmapFragment::scaleY
\brief the vertical scale of the target rectangle.
*/
/*!
- \variable QPainter::Fragment::rotation
+ \variable QPainter::PixmapFragment::rotation
\brief the rotation of the target rectangle in degrees. The target
rectangle is rotated after it has been scaled.
*/
/*!
- \variable QPainter::Fragment::opacity
+ \variable QPainter::PixmapFragment::opacity
\brief the opacity of the target rectangle, where 0.0 is fully transparent
and 1.0 is fully opaque.
@@ -9055,12 +9055,12 @@ QPainter::Fragment QPainter::Fragment::create(const QPointF &pos, const QRectF &
/*!
\since 4.7
- \enum QPainter::FragmentHint
+ \enum QPainter::PixmapFragmentHint
\value OpaqueHint Indicates that the pixmap fragments to be drawn are
opaque. Opaque fragments are potentially faster to draw.
- \sa QPainter::drawPixmapFragments(), QPainter::Fragment
+ \sa QPainter::drawPixmapFragments(), QPainter::PixmapFragment
*/
void qt_draw_helper(QPainterPrivate *p, const QPainterPath &path, QPainterPrivate::DrawOperation operation)
diff --git a/src/gui/painting/qpainter.h b/src/gui/painting/qpainter.h
index bcb0b50..443925b 100644
--- a/src/gui/painting/qpainter.h
+++ b/src/gui/painting/qpainter.h
@@ -99,7 +99,7 @@ public:
Q_DECLARE_FLAGS(RenderHints, RenderHint)
- class Fragment {
+ class PixmapFragment {
public:
qreal x;
qreal y;
@@ -111,16 +111,16 @@ public:
qreal scaleY;
qreal rotation;
qreal opacity;
- static Fragment Q_GUI_EXPORT create(const QPointF &pos, const QRectF &sourceRect,
+ static PixmapFragment Q_GUI_EXPORT create(const QPointF &pos, const QRectF &sourceRect,
qreal scaleX = 1, qreal scaleY = 1,
qreal rotation = 0, qreal opacity = 1);
};
- enum FragmentHint {
+ enum PixmapFragmentHint {
OpaqueHint = 0x01
};
- Q_DECLARE_FLAGS(FragmentHints, FragmentHint)
+ Q_DECLARE_FLAGS(PixmapFragmentHints, PixmapFragmentHint)
QPainter();
explicit QPainter(QPaintDevice *);
@@ -375,8 +375,8 @@ public:
inline void drawPixmap(const QRect &r, const QPixmap &pm);
inline void drawPixmap(int x, int y, int w, int h, const QPixmap &pm);
- void drawPixmapFragments(const Fragment *fragments, int fragmentCount,
- const QPixmap &pixmap, FragmentHints hints = 0);
+ void drawPixmapFragments(const PixmapFragment *fragments, int fragmentCount,
+ const QPixmap &pixmap, PixmapFragmentHints hints = 0);
void drawImage(const QRectF &targetRect, const QImage &image, const QRectF &sourceRect,
Qt::ImageConversionFlags flags = Qt::AutoColor);