Qt 4.8
qpicture_p.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtGui module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QPICTURE_P_H
43 #define QPICTURE_P_H
44 
45 //
46 // W A R N I N G
47 // -------------
48 //
49 // This file is not part of the Qt API. It exists purely as an
50 // implementation detail. This header file may change from version to
51 // version without notice, or even be removed.
52 //
53 // We mean it.
54 //
55 
56 #include "QtCore/qatomic.h"
57 #include "QtCore/qbuffer.h"
58 #include "QtCore/qobjectdefs.h"
59 #include "QtGui/qpicture.h"
60 #include "QtGui/qpixmap.h"
61 #include "QtGui/qpen.h"
62 #include "QtGui/qbrush.h"
63 #include "QtCore/qrect.h"
64 #include "private/qobject_p.h"
65 
67 
68 class QPaintEngine;
69 
70 extern const char *qt_mfhdr_tag;
71 
73 {
74  friend class QPicturePaintEngine;
77 
78 public:
79  enum PaintCommand {
80  PdcNOP = 0, // <void>
81  PdcDrawPoint = 1, // point
83  PdcMoveTo = 2, // point
84  PdcLineTo = 3, // point
85  PdcDrawLine = 4, // point,point
86  PdcDrawRect = 5, // rect
87  PdcDrawRoundRect = 6, // rect,ival,ival
88  PdcDrawEllipse = 7, // rect
89  PdcDrawArc = 8, // rect,ival,ival
90  PdcDrawPie = 9, // rect,ival,ival
91  PdcDrawChord = 10, // rect,ival,ival
92  PdcDrawLineSegments = 11, // ptarr
93  PdcDrawPolyline = 12, // ptarr
94  PdcDrawPolygon = 13, // ptarr,ival
95  PdcDrawCubicBezier = 14, // ptarr
96  PdcDrawText = 15, // point,str
97  PdcDrawTextFormatted = 16, // rect,ival,str
98  PdcDrawPixmap = 17, // rect,pixmap
99  PdcDrawImage = 18, // rect,image
100  PdcDrawText2 = 19, // point,str
101  PdcDrawText2Formatted = 20, // rect,ival,str
102  PdcDrawTextItem = 21, // pos,text,font,flags
104  PdcDrawPoints = 22, // ptarr,ival,ival
105  PdcDrawWinFocusRect = 23, // rect,color
106  PdcDrawTiledPixmap = 24, // rect,pixmap,point
107  PdcDrawPath = 25, // path
108 
109  // no painting commands below PdcDrawLast.
110 
111  PdcBegin = 30, // <void>
112  PdcEnd = 31, // <void>
113  PdcSave = 32, // <void>
114  PdcRestore = 33, // <void>
115  PdcSetdev = 34, // device - PRIVATE
116  PdcSetBkColor = 40, // color
117  PdcSetBkMode = 41, // ival
118  PdcSetROP = 42, // ival
119  PdcSetBrushOrigin = 43, // point
120  PdcSetFont = 45, // font
121  PdcSetPen = 46, // pen
122  PdcSetBrush = 47, // brush
123  PdcSetTabStops = 48, // ival
124  PdcSetTabArray = 49, // ival,ivec
125  PdcSetUnit = 50, // ival
126  PdcSetVXform = 51, // ival
127  PdcSetWindow = 52, // rect
128  PdcSetViewport = 53, // rect
129  PdcSetWXform = 54, // ival
130  PdcSetWMatrix = 55, // matrix,ival
133  PdcSetClip = 60, // ival
134  PdcSetClipRegion = 61, // rgn
135  PdcSetClipPath = 62, // path
136  PdcSetRenderHint = 63, // ival
137  PdcSetCompositionMode = 64, // ival
138  PdcSetClipEnabled = 65, // bool
139  PdcSetOpacity = 66, // qreal
140 
141  PdcReservedStart = 0, // codes 0-199 are reserved
142  PdcReservedStop = 199 // for Qt
143  };
144 
145  QPicturePrivate();
146  QPicturePrivate(const QPicturePrivate &other);
148 
149  bool checkFormat();
150  void resetFormat();
151 
153  int trecs;
154  bool formatOk;
165 };
166 
168 
169 #endif // QPICTURE_P_H
QScopedPointer< QPaintEngine > paintEngine
Definition: qpicture_p.h:159
QList< QPixmap > pixmap_list
Definition: qpicture_p.h:162
#define QT_END_NAMESPACE
This macro expands to.
Definition: qglobal.h:90
The QAtomicInt class provides platform-independent atomic operations on integers. ...
Definition: qatomic.h:55
#define Q_GUI_EXPORT
Definition: qglobal.h:1450
friend Q_GUI_EXPORT QDataStream & operator>>(QDataStream &s, QPicture &r)
The QBuffer class provides a QIODevice interface for a QByteArray.
Definition: qbuffer.h:57
QList< QBrush > brush_list
Definition: qpicture_p.h:163
#define QT_BEGIN_NAMESPACE
This macro expands to.
Definition: qglobal.h:89
const char * qt_mfhdr_tag
Definition: qpicture.cpp:112
QList< QImage > image_list
Definition: qpicture_p.h:161
friend Q_GUI_EXPORT QDataStream & operator<<(QDataStream &s, const QPicture &r)
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
Definition: qpaintengine.h:90
QAtomicInt ref
Definition: qpicture_p.h:147
QRect override_rect
Definition: qpicture_p.h:158
QList< QPen > pen_list
Definition: qpicture_p.h:164
bool checkFormat()
Checks data integrity and format version number.
Definition: qpicture.cpp:1117
The QRect class defines a rectangle in the plane using integer precision.
Definition: qrect.h:58
The QDataStream class provides serialization of binary data to a QIODevice.
Definition: qdatastream.h:71
void resetFormat()
Definition: qpicture.cpp:1099
The QPicture class is a paint device that records and replays QPainter commands.
Definition: qpicture.h:58