40 #include <private/qpaintengine_preview_p.h>
41 #include <private/qpainter_p.h>
42 #include <private/qpaintengine_p.h>
43 #include <private/qpicture_p.h>
45 #include <QtPrintSupport/qprintengine.h>
46 #include <QtGui/qpainter.h>
47 #include <QtGui/qpicture.h>
72 d->proxy_print_engine =
nullptr;
73 d->proxy_paint_engine =
nullptr;
91 page->d_func()->in_memory_only =
true;
93 d->engine =
d->painter->paintEngine();
94 *
d->painter->d_func()->state = *
painter()->d_func()->state;
95 d->pages.append(
page);
105 d->painter =
nullptr;
114 d->engine->updateState(
state);
120 d->engine->drawPath(
path);
132 d->engine->drawTextItem(
p, textItem);
138 d->engine->drawPixmap(
r, pm, sr);
144 d->engine->drawTiledPixmap(
r, pm,
p);
152 page->d_func()->in_memory_only =
true;
158 *tmp_painter->d_func()->state = *
painter()->d_func()->state;
166 d->painter = tmp_painter;
167 d->pages.append(
page);
168 d->engine = tmp_engine;
191 d->proxy_print_engine = printEngine;
192 d->proxy_paint_engine = paintEngine;
198 d->proxy_print_engine->setProperty(
key,
value);
204 return d->proxy_print_engine->property(
key);
210 return d->proxy_print_engine->metric(
id);
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a g...
QPainter * painter() const
void setDirty(DirtyFlags df)
QPaintEngineState * state
The QPaintEngineState class provides information about the active paint engine's current state....
The QPainter class performs low-level painting on widgets and other paint devices.
QPaintEngine * paintEngine() const
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
The QPicture class is a paint device that records and replays QPainter commands.
The QPixmap class is an off-screen image representation that can be used as a paint device.
The QPointF class defines a point in the plane using floating point precision.
void drawPath(const QPainterPath &path) override
void setProxyEngines(QPrintEngine *printEngine, QPaintEngine *paintEngine)
bool begin(QPaintDevice *dev) override
QList< const QPicture * > pages()
void drawPolygon(const QPointF *points, int pointCount, PolygonDrawMode mode) override
void drawTextItem(const QPointF &p, const QTextItem &textItem) override
QVariant property(PrintEnginePropertyKey key) const override
void updateState(const QPaintEngineState &state) override
QPrinter::PrinterState printerState() const override
int metric(QPaintDevice::PaintDeviceMetric) const override
void drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF &sr) override
void drawTiledPixmap(const QRectF &r, const QPixmap &pm, const QPointF &p) override
void setProperty(PrintEnginePropertyKey key, const QVariant &value) override
QPrintEngine * proxy_print_engine
QPreviewPaintEnginePrivate()
~QPreviewPaintEnginePrivate()
QPaintEngine * proxy_paint_engine
QList< const QPicture * > pages
QPrinter::PrinterState state
The QPrintEngine class defines an interface for how QPrinter interacts with a given printing subsyste...
The QPrinter class is a paint device that paints on a printer.
The QRectF class defines a finite rectangle in the plane using floating point precision.
The QTextItem class provides all the information required to draw text in a custom paint engine.
The QVariant class acts like a union for the most common Qt data types.
qDeleteAll(list.begin(), list.end())
EGLOutputLayerEXT EGLint EGLAttrib value
GLfixed GLfixed GLint GLint GLfixed points
GLsizei const GLchar *const * path