42 #ifndef QPAINTENGINE_H 43 #define QPAINTENGINE_H 45 #include <QtCore/qnamespace.h> 46 #include <QtCore/qobjectdefs.h> 47 #include <QtCore/qscopedpointer.h> 48 #include <QtGui/qpainter.h> 79 qreal descent()
const;
83 RenderFlags renderFlags()
const;
95 PrimitiveTransform = 0x00000001,
96 PatternTransform = 0x00000002,
97 PixmapTransform = 0x00000004,
98 PatternBrush = 0x00000008,
99 LinearGradientFill = 0x00000010,
100 RadialGradientFill = 0x00000020,
101 ConicalGradientFill = 0x00000040,
102 AlphaBlend = 0x00000080,
103 PorterDuff = 0x00000100,
104 PainterPaths = 0x00000200,
105 Antialiasing = 0x00000400,
106 BrushStroke = 0x00000800,
107 ConstantOpacity = 0x00001000,
108 MaskedBrush = 0x00002000,
109 PerspectiveTransform = 0x00004000,
110 BlendModes = 0x00008000,
111 ObjectBoundingModeGradients = 0x00010000,
112 RasterOpModes = 0x00020000,
113 PaintOutsidePaintEvent = 0x20000000,
121 AllFeatures = 0xffffffff
128 DirtyBrushOrigin = 0x0004,
130 DirtyBackground = 0x0010,
131 DirtyBackgroundMode = 0x0020,
132 DirtyTransform = 0x0040,
133 DirtyClipRegion = 0x0080,
134 DirtyClipPath = 0x0100,
136 DirtyCompositionMode = 0x0400,
137 DirtyClipEnabled = 0x0800,
138 DirtyOpacity = 0x1000,
158 virtual bool end() = 0;
168 virtual void drawEllipse(
const QRectF &r);
169 virtual void drawEllipse(
const QRect &r);
188 void setSystemClip(
const QRegion &baseClip);
191 void setSystemRect(
const QRect &rect);
192 QRect systemRect()
const;
195 virtual HDC getDC()
const;
196 virtual void releaseDC(HDC hdc)
const;
199 virtual QPoint coordinateOffset()
const;
223 inline void fix_neg_rect(
int *x,
int *y,
int *w,
int *h);
225 inline bool testDirty(DirtyFlags df);
226 inline void setDirty(DirtyFlags df);
227 inline void clearDirty(DirtyFlags df);
229 bool hasFeature(PaintEngineFeatures feature)
const {
return (gccaps & feature) != 0; }
257 #ifndef QT_NO_FREETYPE 260 #ifndef QT_NO_QWS_QPF 263 #ifndef QT_NO_QWS_QPF2 281 friend class QWin32PaintEngine;
282 friend class QWin32PaintEnginePrivate;
292 QPaintEngine::DirtyFlags
state()
const {
return dirtyFlags; }
297 QBrush backgroundBrush()
const;
306 bool isClipEnabled()
const;
308 QPainter::RenderHints renderHints()
const;
310 qreal opacity()
const;
314 bool brushNeedsResolving()
const;
315 bool penNeedsResolving()
const;
346 return ((
state->dirtyFlags & df) != 0);
351 state->dirtyFlags |= df;
357 state->dirtyFlags &= ~static_cast<
uint>(df);
368 #endif // QPAINTENGINE_H The QPainter class performs low-level painting on widgets and other paint devices.
bool testDirty(DirtyFlags df)
QPaintEngine::DirtyFlags state() const
Returns a combination of flags identifying the set of properties that need to be updated when updatin...
#define QT_END_NAMESPACE
This macro expands to.
CompositionMode
Defines the modes supported for digital image compositing.
The QLine class provides a two-dimensional vector using integer precision.
#define Q_DECLARE_FLAGS(Flags, Enum)
The Q_DECLARE_FLAGS() macro expands to.
The QMatrix class specifies 2D transformations of a coordinate system.
PaintEngineFeatures gccaps
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
QPaintEngineState * state
void clearDirty(DirtyFlags df)
The QPointF class defines a point in the plane using floating point precision.
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QPaintEngine::DirtyFlags dirtyFlags
bool isExtended() const
Returns true if the paint engine is a QPaintEngineEx derivative.
The QString class provides a Unicode character string.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
void setAutoDestruct(bool autoDestr)
DirtyFlag
QPaintEngine::updateState().
The QLineF class provides a two-dimensional vector using floating point precision.
#define QT_BEGIN_NAMESPACE
This macro expands to.
bool isActive() const
Returns true if the paint engine is actively drawing; otherwise returns false.
The QRectF class defines a rectangle in the plane using floating point precision. ...
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
void setActive(bool newState)
Sets the active state of the paint engine to state.
static void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
Q_DECLARE_TYPEINFO(QTextItem, Q_PRIMITIVE_TYPE)
The QPolygonF class provides a vector of points using floating point precision.
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
The QRegion class specifies a clip region for a painter.
void setDirty(DirtyFlags df)
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
QPrinter::PrinterState state
The QBrush class defines the fill pattern of shapes drawn by QPainter.
QScopedPointer< QPaintEnginePrivate > d_ptr
The QFont class specifies a font used for drawing text.
The QPoint class defines a point in the plane using integer precision.
The QRect class defines a rectangle in the plane using integer precision.
static void drawPoints(const T *points, int n, const QTransform &transform, IDirectFBSurface *surface)
The QPixmap class is an off-screen image representation that can be used as a paint device...
bool autoDestruct() const
The QPaintEngineState class provides information about the active paint engine's current state...
#define Q_DECLARE_PRIVATE(Class)
The QRasterPaintEngine class enables hardware acceleration of painting operations in Qt for Embedded ...
void fix_neg_rect(int *x, int *y, int *w, int *h)
static void drawLines(const T *lines, int n, const QTransform &transform, IDirectFBSurface *surface)
The QTextItem class provides all the information required to draw text in a custom paint engine...
static const KeyPair *const end
bool hasFeature(PaintEngineFeatures feature) const
Returns true if the paint engine supports the specified feature; otherwise returns false...
PaintEngineFeature
This enum is used to describe the features or capabilities that the paint engine has.