author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 01:19:32 +0300 | |
changeset 37 | 758a864f9613 |
parent 18 | 2f34d5167611 |
permissions | -rw-r--r-- |
0 | 1 |
/**************************************************************************** |
2 |
** |
|
18
2f34d5167611
Revision: 201011
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
3 |
** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
0 | 4 |
** All rights reserved. |
5 |
** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 |
** |
|
7 |
** This file is part of the QtGui module of the Qt Toolkit. |
|
8 |
** |
|
9 |
** $QT_BEGIN_LICENSE:LGPL$ |
|
10 |
** No Commercial Usage |
|
11 |
** This file contains pre-release code and may not be distributed. |
|
12 |
** You may use this file in accordance with the terms and conditions |
|
13 |
** contained in the Technology Preview License Agreement accompanying |
|
14 |
** this package. |
|
15 |
** |
|
16 |
** GNU Lesser General Public License Usage |
|
17 |
** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 |
** General Public License version 2.1 as published by the Free Software |
|
19 |
** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 |
** packaging of this file. Please review the following information to |
|
21 |
** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 |
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 |
** |
|
24 |
** In addition, as a special exception, Nokia gives you certain additional |
|
25 |
** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 |
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 |
** |
|
28 |
** If you have questions regarding the use of this file, please contact |
|
29 |
** Nokia at qt-info@nokia.com. |
|
30 |
** |
|
31 |
** |
|
32 |
** |
|
33 |
** |
|
34 |
** |
|
35 |
** |
|
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 |
||
66 |
QT_BEGIN_NAMESPACE |
|
67 |
||
68 |
class QPaintEngine; |
|
69 |
||
70 |
extern const char *qt_mfhdr_tag; |
|
71 |
||
72 |
class QPicturePrivate |
|
73 |
{ |
|
74 |
friend class QPicturePaintEngine; |
|
75 |
friend Q_GUI_EXPORT QDataStream &operator<<(QDataStream &s, const QPicture &r); |
|
76 |
friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &s, QPicture &r); |
|
77 |
||
78 |
public: |
|
79 |
enum PaintCommand { |
|
80 |
PdcNOP = 0, // <void> |
|
81 |
PdcDrawPoint = 1, // point |
|
82 |
PdcDrawFirst = PdcDrawPoint, |
|
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 |
|
103 |
PdcDrawLast = PdcDrawTextItem, |
|
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 |
|
131 |
PdcSaveWMatrix = 56, |
|
132 |
PdcRestoreWMatrix = 57, |
|
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); |
|
147 |
QAtomicInt ref; |
|
148 |
||
149 |
bool checkFormat(); |
|
150 |
void resetFormat(); |
|
151 |
||
152 |
QBuffer pictb; |
|
153 |
int trecs; |
|
154 |
bool formatOk; |
|
155 |
int formatMajor; |
|
156 |
int formatMinor; |
|
157 |
QRect brect; |
|
158 |
QRect override_rect; |
|
159 |
QScopedPointer<QPaintEngine> paintEngine; |
|
160 |
bool in_memory_only; |
|
161 |
QList<QImage> image_list; |
|
162 |
QList<QPixmap> pixmap_list; |
|
163 |
QList<QBrush> brush_list; |
|
164 |
QList<QPen> pen_list; |
|
165 |
}; |
|
166 |
||
167 |
QT_END_NAMESPACE |
|
168 |
||
169 |
#endif // QPICTURE_P_H |