42 #ifndef QPAINTBUFFER_P_H 43 #define QPAINTBUFFER_P_H 58 #include <private/qpaintengineex_p.h> 59 #include <private/qtextengine_p.h> 65 class QPaintBufferPlayback;
78 int numFrames()
const;
80 void draw(
QPainter *painter,
int frame = 0)
const;
82 int frameStartIndex(
int frame)
const;
83 int frameEndIndex(
int frame)
const;
84 int processCommands(
QPainter *painter,
int begin,
int end)
const;
85 #ifndef QT_NO_DEBUG_STREAM 86 QString commandDescription(
int command)
const;
89 void setBoundingRect(
const QRectF &rect);
100 friend class QOpenGLReplayer;
208 int pos = ints.size();
209 ints.resize(pos + count);
210 memcpy(ints.data() + pos,
data, count *
sizeof(int));
217 int pos = floats.size();
218 floats.resize(pos + count);
219 memcpy(floats.data() + pos,
data, count *
sizeof(
qreal));
225 return variants.size() - 1;
233 return &commands.last();
239 cmd.
offset = addData(var);
242 return &commands.last();
250 ints << path.
hints();
259 return &commands.last();
265 cmd.
offset = addData(pts, arrayLength);
266 cmd.
size = elementCount;
269 return &commands.last();
275 cmd.
offset = addData(pts, arrayLength);
276 cmd.
size = elementCount;
279 return &commands.last();
282 inline void updateBoundingRect(
const QRectF &rect);
306 : vectorPath(d->floats.constData() + cmd.offset,
308 cmd.offset2 & 0x80000000
310 : (const
QPainterPath::ElementType *) (d->ints.constData() + cmd.offset2 + 1),
311 *(d->ints.constData() + (cmd.offset2 & 0x7fffffff))) {}
326 void setupTransform(
QPainter *painter);
369 virtual void clipEnabledChanged();
370 virtual void penChanged();
371 virtual void brushChanged();
372 virtual void brushOriginChanged();
373 virtual void opacityChanged();
374 virtual void compositionModeChanged();
375 virtual void renderHintsChanged();
376 virtual void transformChanged();
377 virtual void backgroundModeChanged();
379 virtual void fillRect(
const QRectF &rect,
const QBrush &brush);
380 virtual void fillRect(
const QRectF &rect,
const QColor &color);
388 virtual void drawEllipse(
const QRectF &r);
389 virtual void drawEllipse(
const QRect &r);
404 virtual void drawImage(
const QPointF &pos,
const QImage &image);
430 emit aboutToDestroy(buffer);
442 typedef void (*FreeFunc)(
void *);
461 #endif // QPAINTBUFFER_P_H
The QVariant class acts like a union for the most common Qt data types.
QHash< const QPaintBufferPrivate *, void * > Cache
virtual uint flags() const
The QPainter class performs low-level painting on widgets and other paint devices.
The QColor class provides colors based on RGB, HSV or CMYK values.
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &stream, const QPaintBuffer &buffer)
QPaintBufferCommand * addCommand(Command command, const int *pts, int arrayLength, int elementCount)
#define QT_END_NAMESPACE
This macro expands to.
QPaintBufferPrivate * d_ptr
The QLine class provides a two-dimensional vector using integer precision.
uint calculateBoundingRect
The QAtomicInt class provides platform-independent atomic operations on integers. ...
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
The QPointF class defines a point in the plane using floating point precision.
QPaintBufferCommand * addCommand(Command command, const qreal *pts, int arrayLength, int elementCount)
QPaintBufferSignalProxy()
void emitAboutToDestroy(const QPaintBufferPrivate *buffer)
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &stream, QPaintBuffer &buffer)
The QString class provides a Unicode character string.
Q_DECLARE_TYPEINFO(QPaintBufferCommand, Q_MOVABLE_TYPE)
The QObject class is the base class of all Qt objects.
The QPen class defines how a QPainter should draw lines and outlines of shapes.
virtual int devType() const
const QPainterPath::ElementType * elements() const
The QLineF class provides a two-dimensional vector using floating point precision.
static const QRectF boundingRect(const QPointF *points, int pointCount)
QPaintBufferCommand * addCommand(Command command, const QVectorPath &path)
QPaintBufferPrivate * buffer
int m_stream_raw_text_items
int addData(const int *data, int count)
#define QT_BEGIN_NAMESPACE
This macro expands to.
The QRectF class defines a rectangle in the plane using floating point precision. ...
QVectorPathCmd(QPaintBufferPrivate *d, const QPaintBufferCommand &cmd)
static bool isEmpty(const char *str)
QVector< QPaintBufferCommand > commands
int addData(const QVariant &var)
static void drawRects(const T *rects, int n, const QTransform &transform, IDirectFBSurface *surface)
The QImage class provides a hardware-independent image representation that allows direct access to th...
static const char * data(const QByteArray &arr)
virtual ~QPainterReplayer()
The QRegion class specifies a clip region for a painter.
virtual Type type() const
Reimplement this function to return the paint engine Type.
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
The QBrush class defines the fill pattern of shapes drawn by QPainter.
virtual QPaintEngine * paintEngine() const =0
QPaintBufferEngine * engine
The QFont class specifies a font used for drawing text.
const QVectorPath & operator()() const
The QPoint class defines a point in the plane using integer precision.
const qreal * points() const
The QRect class defines a rectangle in the plane using integer precision.
virtual int metric(PaintDeviceMetric metric) const
static void drawPoints(const T *points, int n, const QTransform &transform, IDirectFBSurface *surface)
QPainterState * m_created_state
The QPixmap class is an off-screen image representation that can be used as a paint device...
QPaintBufferCommand * addCommand(Command command)
#define Q_DECLARE_PRIVATE(Class)
int addData(const qreal *data, int count)
The QDataStream class provides serialization of binary data to a QIODevice.
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
QPaintBufferCommand * addCommand(Command command, const QVariant &var)
QTransform m_world_matrix
QVector< QVariant > variants