summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qdrawutil.h
diff options
context:
space:
mode:
authorKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-01 13:36:57 +0200
committerKim Motoyoshi Kalland <kim.kalland@nokia.com>2009-10-02 17:57:19 +0200
commit5a26fa6da1986bdb507391fd8784c51258e81d80 (patch)
treee1c0d4aac597cc0ace85e0619d46648a8ce75038 /src/gui/painting/qdrawutil.h
parent385176ad28b3a79bcd196d2d529c4bf7abd4fcc0 (diff)
Changed implementation of qDrawBorderPixmap() to use qDrawPixmaps().
Reviewed-by: Trond
Diffstat (limited to 'src/gui/painting/qdrawutil.h')
-rw-r--r--src/gui/painting/qdrawutil.h63
1 files changed, 53 insertions, 10 deletions
diff --git a/src/gui/painting/qdrawutil.h b/src/gui/painting/qdrawutil.h
index 98a36a7267..fff1cc166b 100644
--- a/src/gui/painting/qdrawutil.h
+++ b/src/gui/painting/qdrawutil.h
@@ -143,13 +143,43 @@ struct QTileRules
Qt::TileRule vertical;
};
+#ifndef Q_QDOC
+// For internal use only.
+namespace QDrawBorderPixmap
+{
+ enum DrawingHint
+ {
+ OpaqueTopLeft = 0x0001,
+ OpaqueTop = 0x0002,
+ OpaqueTopRight = 0x0004,
+ OpaqueLeft = 0x0008,
+ OpaqueCenter = 0x0010,
+ OpaqueRight = 0x0020,
+ OpaqueBottomLeft = 0x0040,
+ OpaqueBottom = 0x0080,
+ OpaqueBottomRight = 0x0100,
+ OpaqueCorners = OpaqueTopLeft | OpaqueTopRight | OpaqueBottomLeft | OpaqueBottomRight,
+ OpaqueEdges = OpaqueTop | OpaqueLeft | OpaqueRight | OpaqueBottom,
+ OpaqueFrame = OpaqueCorners | OpaqueEdges,
+ OpaqueAll = OpaqueCenter | OpaqueFrame
+ };
+
+ Q_DECLARE_FLAGS(DrawingHints, DrawingHint)
+}
+#endif
+
Q_GUI_EXPORT void qDrawBorderPixmap(QPainter *painter,
const QRect &targetRect,
const QMargins &targetMargins,
const QPixmap &pixmap,
const QRect &sourceRect,
const QMargins &sourceMargins,
- const QTileRules &rules = QTileRules());
+ const QTileRules &rules = QTileRules()
+#ifndef Q_QDOC
+ , QDrawBorderPixmap::DrawingHints hints = 0
+#endif
+ );
+
inline void qDrawBorderPixmap(QPainter *painter,
const QRect &target,
const QMargins &margins,
@@ -158,17 +188,30 @@ inline void qDrawBorderPixmap(QPainter *painter,
qDrawBorderPixmap(painter, target, margins, pixmap, pixmap.rect(), margins);
}
-struct QDrawPixmapsData
+// For internal use only.
+namespace QDrawPixmaps
{
- QPointF point;
- QRectF source;
- qreal scaleX;
- qreal scaleY;
- qreal rotation;
- qreal opacity;
-};
+ struct Data
+ {
+ QPointF point;
+ QRectF source;
+ qreal scaleX;
+ qreal scaleY;
+ qreal rotation;
+ qreal opacity;
+ };
+
+ enum DrawingHint
+ {
+ OpaqueHint = 0x01
+ };
+
+ Q_DECLARE_FLAGS(DrawingHints, DrawingHint)
+}
-Q_GUI_EXPORT void qDrawPixmaps(QPainter *painter, const QDrawPixmapsData *drawingData, int dataCount, const QPixmap &pixmap);
+// This function is private and may change without notice. Do not use outside Qt!!!
+Q_GUI_EXPORT void qDrawPixmaps(QPainter *painter, const QDrawPixmaps::Data *drawingData,
+ int dataCount, const QPixmap &pixmap, QDrawPixmaps::DrawingHints hints = 0);
QT_END_NAMESPACE