Qt 4.8
|
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform. More...
#include <qpaintengine.h>
Public Functions | |
virtual bool | begin (QPaintDevice *pdev)=0 |
Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev. More... | |
void | clearDirty (DirtyFlags df) |
virtual QPoint | coordinateOffset () const |
Returns the offset from the painters origo to the engines origo. More... | |
virtual void | drawEllipse (const QRectF &r) |
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect. More... | |
virtual void | drawEllipse (const QRect &r) |
The default implementation of this function calls the floating point version of this function. More... | |
virtual void | drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) |
Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap. More... | |
virtual void | drawLines (const QLine *lines, int lineCount) |
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function. More... | |
virtual void | drawLines (const QLineF *lines, int lineCount) |
The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine. More... | |
virtual void | drawPath (const QPainterPath &path) |
The default implementation ignores the path and does nothing. More... | |
virtual void | drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr)=0 |
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r. More... | |
virtual void | drawPoints (const QPointF *points, int pointCount) |
Draws the first pointCount points in the buffer points. More... | |
virtual void | drawPoints (const QPoint *points, int pointCount) |
Draws the first pointCount points in the buffer points. More... | |
virtual void | drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) |
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode. More... | |
virtual void | drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) |
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode. More... | |
virtual void | drawRects (const QRect *rects, int rectCount) |
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function. More... | |
virtual void | drawRects (const QRectF *rects, int rectCount) |
Draws the first rectCount rectangles in the buffer rects. More... | |
virtual void | drawTextItem (const QPointF &p, const QTextItem &textItem) |
This function draws the text item textItem at position p. More... | |
virtual void | drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s) |
Reimplement this function to draw the pixmap in the given rect, starting at the given p. More... | |
virtual bool | end ()=0 |
Reimplement this function to finish painting on the current paint device. More... | |
void | fix_neg_rect (int *x, int *y, int *w, int *h) |
virtual HDC | getDC () const |
Empty default implementation. More... | |
bool | hasFeature (PaintEngineFeatures feature) const |
Returns true if the paint engine supports the specified feature; otherwise returns false. More... | |
bool | isActive () const |
Returns true if the paint engine is actively drawing; otherwise returns false. More... | |
bool | isExtended () const |
Returns true if the paint engine is a QPaintEngineEx derivative. More... | |
QPaintDevice * | paintDevice () const |
Returns the device that this engine is painting on, if painting is active; otherwise returns 0. More... | |
QPainter * | painter () const |
Returns the paint engine's painter. More... | |
QPaintEngine (PaintEngineFeatures features=0) | |
Creates a paint engine with the featureset specified by caps. More... | |
virtual void | releaseDC (HDC hdc) const |
Empty default implementation. More... | |
void | setActive (bool newState) |
Sets the active state of the paint engine to state. More... | |
void | setDirty (DirtyFlags df) |
void | setPaintDevice (QPaintDevice *device) |
void | setSystemClip (const QRegion &baseClip) |
Sets the system clip for this engine. More... | |
void | setSystemRect (const QRect &rect) |
Sets the target rect for drawing within the backing store. More... | |
void | syncState () |
Updates all dirty states in this engine. More... | |
QRegion | systemClip () const |
Returns the system clip. More... | |
QRect | systemRect () const |
Retrieves the rect for drawing within the backing store. More... | |
bool | testDirty (DirtyFlags df) |
virtual Type | type () const =0 |
Reimplement this function to return the paint engine Type. More... | |
virtual void | updateState (const QPaintEngineState &state)=0 |
Reimplement this function to update the state of a paint engine. More... | |
virtual | ~QPaintEngine () |
Destroys the paint engine. More... | |
Protected Functions | |
QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=0) | |
Protected Variables | |
uint | active: 1 |
QScopedPointer< QPaintEnginePrivate > | d_ptr |
uint | extended: 1 |
PaintEngineFeatures | gccaps |
uint | selfDestruct: 1 |
QPaintEngineState * | state |
Private Functions | |
bool | autoDestruct () const |
void | setAutoDestruct (bool autoDestr) |
The QPaintEngine class provides an abstract definition of how QPainter draws to a given device on a given platform.
Qt 4.0 provides several premade implementations of QPaintEngine for the different painter backends we support. We provide one paint engine for each window system and painting framework we support. This includes X11 on Unix/Linux and CoreGraphics on Mac OS X. In addition we provide QPaintEngine implementations for OpenGL (accessible through QGLWidget) and PostScript (accessible through QPSPrinter on X11). Additionally there is a raster-based paint engine that is a fallback for when an engine does not support a certain capability.
If one wants to use QPainter to draw to a different backend, one must subclass QPaintEngine and reimplement all its virtual functions. The QPaintEngine implementation is then made available by subclassing QPaintDevice and reimplementing the virtual function QPaintDevice::paintEngine().
QPaintEngine is created and owned by the QPaintDevice that created it.
The big advantage of the QPaintEngine approach opposed to Qt 3's QPainter/QPaintDevice::cmd() approach is that it is now possible to adapt to multiple technologies on each platform and take advantage of each to the fullest.
Definition at line 90 of file qpaintengine.h.
These types are used by QPainter to trigger lazy updates of the various states in the QPaintEngine using QPaintEngine::updateState().
A paint engine must update every dirty state.
Definition at line 125 of file qpaintengine.h.
This enum is used to describe the features or capabilities that the paint engine has.
If a feature is not supported by the engine, QPainter will do a best effort to emulate that feature through other means and pass on an alpha blended QImage to the engine with the emulated results. Some features cannot be emulated: AlphaBlend and PorterDuff.
Definition at line 94 of file qpaintengine.h.
Enumerator | |
---|---|
OddEvenMode | |
WindingMode | |
ConvexMode | |
PolylineMode |
Definition at line 144 of file qpaintengine.h.
enum QPaintEngine::Type |
Enumerator | |
---|---|
X11 | |
Windows | |
QuickDraw | |
CoreGraphics | |
MacPrinter | |
QWindowSystem | |
PostScript | |
OpenGL | |
Picture | |
SVG | |
Raster | |
Direct3D | |
OpenVG | |
OpenGL2 | |
PaintBuffer | |
Blitter | |
User | |
MaxUser |
Definition at line 201 of file qpaintengine.h.
|
explicit |
Creates a paint engine with the featureset specified by caps.
Definition at line 758 of file qpaintengine.cpp.
|
virtual |
|
protected |
Definition at line 773 of file qpaintengine.cpp.
|
inlineprivate |
|
pure virtual |
Reimplement this function to initialise your paint engine when painting is to start on the paint device pdev.
Return true if the initialization was successful; otherwise return false.
Implemented in QOnScreenRasterPaintEngine, QPaintBufferEngine, QPdfBaseEngine, QSvgPaintEngine, QRasterPaintEngine, QGL2PaintEngineEx, QPdfEngine, QVGPaintEngine, QX11PaintEngine, QOpenGLPaintEngine, QMacPrintEngine, QPSPrintEngine, QtopiaPrintEngine, QWin32PrintEngine, QCoreGraphicsPaintEngine, QPicturePaintEngine, QPreviewPaintEngine, QEmulationPaintEngine, QAlphaPaintEngine, QDirectFBPaintEngine, QVolatileImagePaintEngine, and QBlitterPaintEngine.
Referenced by QVGPaintEngine::type().
|
inline |
Definition at line 354 of file qpaintengine.h.
Referenced by QPainterPrivate::updateStateImpl().
|
virtual |
Returns the offset from the painters origo to the engines origo.
This value is used by QPainter for engines who have internal double buffering.
This function only makes sense when the engine is active.
Reimplemented in QOnScreenRasterPaintEngine, and QRasterPaintEngine.
Definition at line 1021 of file qpaintengine.cpp.
Referenced by QPainterPrivate::attachPainterPrivate().
|
virtual |
Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.
The default implementation calls drawPolygon().
Reimplemented in QPaintBufferEngine, QPaintEngineEx, QRasterPaintEngine, QOpenGLPaintEngine, QVGPaintEngine, QX11PaintEngine, QMacPrintEngine, QCoreGraphicsPaintEngine, QDirectFBPaintEngine, QPicturePaintEngine, and QBlitterPaintEngine.
Definition at line 551 of file qpaintengine.cpp.
Referenced by QX11PaintEngine::drawEllipse(), and QCoreGraphicsPaintEngine::drawEllipse().
|
virtual |
The default implementation of this function calls the floating point version of this function.
Reimplemented in QPaintBufferEngine, QPaintEngineEx, QVGPaintEngine, QCoreGraphicsPaintEngine, and QX11PaintEngine.
Definition at line 567 of file qpaintengine.cpp.
|
virtual |
Reimplement this function to draw the part of the image specified by the sr rectangle in the given rectangle using the given conversion flags flags, to convert it to a pixmap.
Reimplemented in QPaintBufferEngine, QPaintEngineEx, QRasterPaintEngine, QVGPaintEngine, QOpenGLPaintEngine, QGL2PaintEngineEx, QX11PaintEngine, QMacPrintEngine, QCoreGraphicsPaintEngine, QPicturePaintEngine, QPdfEngine, QBlitterPaintEngine, QPSPrintEngine, QEmulationPaintEngine, and QDirectFBPaintEngine.
Definition at line 670 of file qpaintengine.cpp.
Referenced by QPainterPrivate::draw_helper(), and QX11PaintEngine::drawImage().
|
virtual |
The default implementation converts the first lineCount lines in lines to a QLineF and calls the floating point version of this function.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in QPaintBufferEngine, QRasterPaintEngine, QPaintEngineEx, QOpenGLPaintEngine, QCoreGraphicsPaintEngine, QVGPaintEngine, QX11PaintEngine, and QDirectFBPaintEngine.
Definition at line 867 of file qpaintengine.cpp.
Referenced by QCoreGraphicsPaintEngine::drawLines().
|
virtual |
The default implementation splits the list of lines in lines into lineCount separate calls to drawPath() or drawPolygon() depending on the feature set of the paint engine.
Reimplemented in QPaintBufferEngine, QPdfBaseEngine, QRasterPaintEngine, QPaintEngineEx, QOpenGLPaintEngine, QVGPaintEngine, QMacPrintEngine, QX11PaintEngine, QCoreGraphicsPaintEngine, and QDirectFBPaintEngine.
Definition at line 842 of file qpaintengine.cpp.
|
virtual |
The default implementation ignores the path and does nothing.
Reimplemented in QPaintBufferEngine, QPdfBaseEngine, QPaintEngineEx, QSvgPaintEngine, QOpenGLPaintEngine, QVGPaintEngine, QX11PaintEngine, QMacPrintEngine, QCoreGraphicsPaintEngine, QPicturePaintEngine, QDirectFBPaintEngine, QWin32PrintEngine, QPreviewPaintEngine, and QAlphaPaintEngine.
Definition at line 803 of file qpaintengine.cpp.
Referenced by drawRects(), and QPainterPrivate::drawStretchedGradient().
|
pure virtual |
Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.
Implemented in QPaintBufferEngine, QPaintEngineEx, QRasterPaintEngine, QSvgPaintEngine, QVGPaintEngine, QGL2PaintEngineEx, QOpenGLPaintEngine, QX11PaintEngine, QMacPrintEngine, QPicturePaintEngine, QCoreGraphicsPaintEngine, QPdfEngine, QWin32PrintEngine, QPSPrintEngine, QPreviewPaintEngine, QDirectFBPaintEngine, QtopiaPrintEngine, QEmulationPaintEngine, QAlphaPaintEngine, QBlitterPaintEngine, and QVolatileImagePaintEngine.
Referenced by qt_draw_tile().
|
virtual |
Draws the first pointCount points in the buffer points.
Reimplemented in QPaintBufferEngine, QRasterPaintEngine, QPdfBaseEngine, QPaintEngineEx, QVGPaintEngine, QOpenGLPaintEngine, QX11PaintEngine, QMacPrintEngine, QBlitterPaintEngine, QCoreGraphicsPaintEngine, and QDirectFBPaintEngine.
Definition at line 479 of file qpaintengine.cpp.
Referenced by drawLines(), QCoreGraphicsPaintEngine::drawPoints(), and QOpenGLPaintEngine::drawPoints().
|
virtual |
Draws the first pointCount points in the buffer points.
The default implementation converts the first pointCount QPoints in points to QPointFs and calls the floating point version of drawPoints.
Reimplemented in QPaintBufferEngine, QRasterPaintEngine, QPaintEngineEx, QVGPaintEngine, QOpenGLPaintEngine, QCoreGraphicsPaintEngine, QX11PaintEngine, QBlitterPaintEngine, and QDirectFBPaintEngine.
Definition at line 523 of file qpaintengine.cpp.
|
virtual |
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
Reimplemented in QPaintBufferEngine, QPdfBaseEngine, QPaintEngineEx, QSvgPaintEngine, QRasterPaintEngine, QOpenGLPaintEngine, QVGPaintEngine, QX11PaintEngine, QMacPrintEngine, QCoreGraphicsPaintEngine, QPicturePaintEngine, QDirectFBPaintEngine, QWin32PrintEngine, QBlitterPaintEngine, QPreviewPaintEngine, and QAlphaPaintEngine.
Definition at line 360 of file qpaintengine.cpp.
Referenced by drawLines(), QX11PaintEngine::drawPolygon(), QCoreGraphicsPaintEngine::drawPolygon(), and drawRects().
|
virtual |
Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in QPaintBufferEngine, QPaintEngineEx, QRasterPaintEngine, QOpenGLPaintEngine, QVGPaintEngine, QCoreGraphicsPaintEngine, QX11PaintEngine, QDirectFBPaintEngine, and QBlitterPaintEngine.
Definition at line 390 of file qpaintengine.cpp.
|
virtual |
The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Reimplemented in QPaintBufferEngine, QRasterPaintEngine, QPaintEngineEx, QOpenGLPaintEngine, QCoreGraphicsPaintEngine, QVGPaintEngine, QX11PaintEngine, QBlitterPaintEngine, and QDirectFBPaintEngine.
Definition at line 906 of file qpaintengine.cpp.
Referenced by QX11PaintEngine::drawRects(), QCoreGraphicsPaintEngine::drawRects(), and QPdfBaseEngine::drawRects().
|
virtual |
Draws the first rectCount rectangles in the buffer rects.
The default implementation of this function calls drawPath() or drawPolygon() depending on the feature set of the paint engine.
Reimplemented in QPaintBufferEngine, QPdfBaseEngine, QRasterPaintEngine, QPaintEngineEx, QOpenGLPaintEngine, QVGPaintEngine, QMacPrintEngine, QX11PaintEngine, QCoreGraphicsPaintEngine, QBlitterPaintEngine, and QDirectFBPaintEngine.
Definition at line 936 of file qpaintengine.cpp.
This function draws the text item textItem at position p.
The default implementation of this function converts the text to a QPainterPath and paints the resulting path.
Reimplemented in QPaintBufferEngine, QPdfBaseEngine, QRasterPaintEngine, QSvgPaintEngine, QVGPaintEngine, QOpenGLPaintEngine, QGL2PaintEngineEx, QX11PaintEngine, QMacPrintEngine, QPicturePaintEngine, QCoreGraphicsPaintEngine, QDirectFBPaintEngine, QBlitterPaintEngine, QWin32PrintEngine, QtopiaPrintEngine, QEmulationPaintEngine, QAlphaPaintEngine, and QPreviewPaintEngine.
Definition at line 816 of file qpaintengine.cpp.
Referenced by QRasterPaintEngine::drawCachedGlyphs(), QX11PaintEngine::drawFreetype(), QEmulationPaintEngine::drawTextItem(), QWin32PrintEngine::drawTextItem(), QCoreGraphicsPaintEngine::drawTextItem(), QPicturePaintEngine::drawTextItem(), QGL2PaintEngineEx::drawTextItem(), QOpenGLPaintEngine::drawTextItem(), QVGPaintEngine::drawTextItem(), QRasterPaintEngine::drawTextItem(), QPdfBaseEngine::drawTextItem(), QX11PaintEngine::drawXLFD(), and QVGPaintEngine::type().
|
virtual |
Reimplement this function to draw the pixmap in the given rect, starting at the given p.
The pixmap will be drawn repeatedly until the rect is filled.
Reimplemented in QPaintBufferEngine, QPaintEngineEx, QRasterPaintEngine, QVGPaintEngine, QOpenGLPaintEngine, QX11PaintEngine, QMacPrintEngine, QPicturePaintEngine, QCoreGraphicsPaintEngine, QPdfEngine, QBlitterPaintEngine, QWin32PrintEngine, QPSPrintEngine, QPreviewPaintEngine, QDirectFBPaintEngine, QEmulationPaintEngine, and QAlphaPaintEngine.
Definition at line 632 of file qpaintengine.cpp.
Referenced by QWin32PrintEngine::drawTiledPixmap().
|
pure virtual |
Reimplement this function to finish painting on the current paint device.
Return true if painting was finished successfully; otherwise return false.
Implemented in QOnScreenRasterPaintEngine, QPaintBufferEngine, QPdfBaseEngine, QSvgPaintEngine, QRasterPaintEngine, QGL2PaintEngineEx, QPdfEngine, QVGPaintEngine, QX11PaintEngine, QOpenGLPaintEngine, QMacPrintEngine, QPSPrintEngine, QtopiaPrintEngine, QWin32PrintEngine, QCoreGraphicsPaintEngine, QPicturePaintEngine, QPreviewPaintEngine, QEmulationPaintEngine, QAlphaPaintEngine, QDirectFBPaintEngine, QVolatileImagePaintEngine, and QBlitterPaintEngine.
Referenced by QVGPaintEngine::type().
|
inline |
Definition at line 332 of file qpaintengine.h.
|
virtual |
Empty default implementation.
Reimplemented in QRasterPaintEngine, and QWin32PrintEngine.
Definition at line 988 of file qpaintengine.cpp.
Referenced by QWindowsXPStylePrivate::drawBackground(), QWindowsXPStylePrivate::drawBackgroundDirectly(), QVistaHelper::drawTitleBar(), XPThemeData::mask(), and QVistaBackButton::paintEvent().
|
inline |
Returns true if the paint engine supports the specified feature; otherwise returns false.
Definition at line 229 of file qpaintengine.h.
Referenced by QPainterPrivate::attachPainterPrivate(), QPainterPrivate::draw_helper(), QCommonStyle::drawComplexControl(), drawPath(), drawRects(), QPainterPrivate::drawStretchedGradient(), QDecorationStyled::paint(), QDecorationDefault::paint(), QDecorationDefault::paintButton(), and QPainterPrivate::updateEmulationSpecifier().
|
inline |
Returns true if the paint engine is actively drawing; otherwise returns false.
Definition at line 154 of file qpaintengine.h.
Referenced by QCoreGraphicsPaintEngine::begin(), QCoreGraphicsPaintEngine::drawEllipse(), QCoreGraphicsPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawLines(), QCoreGraphicsPaintEngine::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPoints(), QCoreGraphicsPaintEngine::drawPolygon(), QCoreGraphicsPaintEngine::drawRects(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QGL2PaintEngineEx::ensureActive(), QX11PaintEngine::handle(), QWin32PrintEngine::newPage(), QPdfEngine::newPage(), QGLFramebufferObject::paintEngine(), QWidget::paintEngine(), QVolatileImage::paintingActive(), QPixmapCacheEntry::QPixmapCacheEntry(), qt_x11_get_brush_gc(), qt_x11_get_pen_gc(), QWin32PrintEngine::setProperty(), setSystemRect(), QRasterPixmapData::toImage(), QGLPixmapData::toImage(), QCoreGraphicsPaintEngine::updateBrush(), QCoreGraphicsPaintEngine::updateClipPath(), QCoreGraphicsPaintEngine::updateClipRegion(), QCoreGraphicsPaintEngine::updateFont(), QCoreGraphicsPaintEngine::updateMatrix(), and QCoreGraphicsPaintEngine::updatePen().
|
inline |
Returns true if the paint engine is a QPaintEngineEx derivative.
Definition at line 234 of file qpaintengine.h.
Referenced by QPixmapConvolutionFilter::draw(), QPixmapBlurFilter::draw(), QPixmapColorizeFilter::draw(), QPixmapDropShadowFilter::draw(), QPaintEngineExReplayer::process(), QPaintBuffer::processCommands(), and syncState().
QPaintDevice * QPaintEngine::paintDevice | ( | ) | const |
Returns the device that this engine is painting on, if painting is active; otherwise returns 0.
Definition at line 973 of file qpaintengine.cpp.
Referenced by QPainterPrivate::attachPainterPrivate(), QVGPaintEngine::clearRect(), QVGPaintEngine::clip(), QVGPaintEngine::clipEnabledChanged(), QVGPaintEngine::defaultClipRegion(), QPixmapConvolutionFilter::draw(), QBlitterPaintEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawTextItem(), QVGPaintEngine::isDefaultClipRect(), QVGPaintEngine::isDefaultClipRegion(), QVGPaintEnginePrivate::modifyMask(), QGLFramebufferObject::paintEngine(), QMacCGContext::QMacCGContext(), QWidget::render(), QRasterPixmapData::toImage(), QGLPixmapData::toImage(), QVGPaintEngine::transformChanged(), and QVGPaintEngine::updateScissor().
QPainter * QPaintEngine::painter | ( | ) | const |
Returns the paint engine's painter.
Definition at line 794 of file qpaintengine.cpp.
Referenced by QPaintBufferEngine::begin(), QFontEngineBox::boundingBox(), QGL2PaintEngineEx::clipEnabledChanged(), QPaintEnginePrivate::drawBoxTextItem(), QX11PaintEngine::drawFreetype(), QEmulationPaintEngine::drawTextItem(), QCoreGraphicsPaintEngine::drawTextItem(), drawTextItem(), QPSPrintEngine::drawTiledPixmap(), QPaintBufferEngine::end(), QEmulationPaintEngine::fill(), QVGPaintEngine::fill(), QX11PaintEnginePrivate::fillPolygon_dev(), QAlphaPaintEngine::flushAndInit(), QPreviewPaintEngine::newPage(), QMacPrintEnginePrivate::newPage_helper(), QPaintBufferEngine::penChanged(), QPainterReplayer::process(), QPaintEngineExReplayer::process(), QPainterReplayer::processCommands(), QPainterReplayer::setupTransform(), QEmulationPaintEngine::stroke(), QPaintBufferPrivate::updateBoundingRect(), QPdfBaseEngine::updateClipPath(), QCoreGraphicsPaintEngine::updateState(), QWin32PrintEngine::updateState(), QX11PaintEngine::updateState(), QOpenGLPaintEngine::updateState(), QPicturePaintEngine::writeCmdLength(), and QVGPixmapConvolutionFilter::~QVGPixmapConvolutionFilter().
|
virtual |
Empty default implementation.
Reimplemented in QRasterPaintEngine, and QWin32PrintEngine.
Definition at line 1003 of file qpaintengine.cpp.
Referenced by XPThemeData::mask().
|
inline |
Sets the active state of the paint engine to state.
Definition at line 155 of file qpaintengine.h.
Referenced by QPicturePaintEngine::begin(), QCoreGraphicsPaintEngine::begin(), QPSPrintEngine::begin(), QMacPrintEngine::begin(), QPdfEngine::begin(), QRasterPaintEngine::begin(), QPicturePaintEngine::end(), QCoreGraphicsPaintEngine::end(), QPSPrintEngine::end(), and QPdfEngine::end().
|
inlineprivate |
|
inline |
Definition at line 349 of file qpaintengine.h.
Referenced by QCoreGraphicsPaintEngine::begin(), QX11PaintEngine::begin(), QRasterPaintEngine::begin(), QPreviewPaintEngine::newPage(), and QPainterPrivate::updateStateImpl().
void QPaintEngine::setPaintDevice | ( | QPaintDevice * | device | ) |
Definition at line 964 of file qpaintengine.cpp.
void QPaintEngine::setSystemClip | ( | const QRegion & | region | ) |
Sets the system clip for this engine.
The system clip defines the basis area that the engine has to draw in. All clips that are set will be be an intersection with the system clip.
Reset the systemclip to no clip by setting an empty region.
Definition at line 1038 of file qpaintengine.cpp.
Referenced by QX11PaintEngine::begin(), QX11PaintEngine::end(), make_widget_eventUPP(), QSystemTrayIconSys::paintEvent(), QPainterReplayer::process(), QWidgetBackingStore::removeDirtyWidget(), and QWidgetBackingStore::showYellowThing().
void QPaintEngine::setSystemRect | ( | const QRect & | rect | ) |
Sets the target rect for drawing within the backing store.
This function should ONLY be used by the backing store.
Definition at line 1075 of file qpaintengine.cpp.
void QPaintEngine::syncState | ( | ) |
Updates all dirty states in this engine.
This function should ONLY be used when drawing with native handles directly and immediate sync from QPainters state to the native state is required.
Definition at line 335 of file qpaintengine.cpp.
Referenced by QMacStyle::drawComplexControl(), QPreviewPaintEngine::newPage(), QMacPrintEnginePrivate::newPage_helper(), and QMacCGContext::QMacCGContext().
QRegion QPaintEngine::systemClip | ( | ) | const |
Returns the system clip.
The system clip is read only while the painter is active. An empty region indicates that system clip is not in use.
Definition at line 1061 of file qpaintengine.cpp.
Referenced by QGL2PaintEngineEx::begin(), QWindowsXPStylePrivate::drawBackgroundDirectly(), QWidgetPrivate::drawWidget(), QDeclarativePaintedItem::paint(), QSystemTrayIconSys::paintEvent(), QPainterReplayer::process(), QMacCGContext::QMacCGContext(), QWidgetBackingStore::removeDirtyWidget(), QGL2PaintEngineExPrivate::systemStateChanged(), QX11PaintEngine::updateBrush(), QOpenGLPaintEngine::updateClipRegion(), QX11PaintEngine::updateClipRegion_dev(), QGL2PaintEngineExPrivate::updateClipScissorTest(), and QX11PaintEngine::updatePen().
QRect QPaintEngine::systemRect | ( | ) | const |
Retrieves the rect for drawing within the backing store.
This function should ONLY be used by the backing store.
Definition at line 1093 of file qpaintengine.cpp.
Referenced by QWidgetPrivate::drawWidget().
|
inline |
Definition at line 344 of file qpaintengine.h.
|
pure virtual |
Reimplement this function to return the paint engine Type.
Implemented in QPaintBufferEngine, QRasterPaintEngine, QSvgPaintEngine, QOpenGLPaintEngine, QGL2PaintEngineEx, QX11PaintEngine, QPicturePaintEngine, QCoreGraphicsPaintEngine, QPdfEngine, QWin32PrintEngine, QPSPrintEngine, QPreviewPaintEngine, QVGPaintEngine, QMacPrintEngine, QtopiaPrintEngine, QEmulationPaintEngine, and QBlitterPaintEngine.
Referenced by QGL2PaintEngineExPrivate::cleanupVectorPath(), QGLPixmapData::copy(), QDeclarativeTextLayout::draw(), QGraphicsBlurEffect::draw(), QGraphicsDropShadowEffect::draw(), drawTextItemDecoration(), qDrawBorderPixmap(), QMacCGContext::QMacCGContext(), QNativeImage::QNativeImage(), QPrinter::QPrinter(), qt_x11_get_brush_gc(), qt_x11_get_pen_gc(), QGLCustomShaderStage::removeFromPainter(), QWidgetPrivate::repaint_sys(), QGLCustomShaderStage::setOnPainter(), QNativeImage::systemFormat(), and QEmulationPaintEngine::type().
|
pure virtual |
Reimplement this function to update the state of a paint engine.
When implemented, this function is responsible for checking the paint engine's current state and update the properties that are changed. Use the QPaintEngineState::state() function to find out which properties that must be updated, then use the corresponding GetFunction{get function} to retrieve the current values for the given properties.
Implemented in QPaintEngineEx, QPdfBaseEngine, QSvgPaintEngine, QOpenGLPaintEngine, QMacPrintEngine, QX11PaintEngine, QtopiaPrintEngine, QCoreGraphicsPaintEngine, QWin32PrintEngine, QPicturePaintEngine, QPreviewPaintEngine, and QAlphaPaintEngine.
Referenced by QPainterPrivate::updateStateImpl().
|
friend |
Definition at line 254 of file qpaintengine.h.
|
friend |
Definition at line 258 of file qpaintengine.h.
|
friend |
Definition at line 255 of file qpaintengine.h.
|
friend |
Definition at line 264 of file qpaintengine.h.
|
friend |
Definition at line 261 of file qpaintengine.h.
|
friend |
Definition at line 256 of file qpaintengine.h.
|
friend |
Definition at line 283 of file qpaintengine.h.
|
friend |
Definition at line 267 of file qpaintengine.h.
|
friend |
Definition at line 268 of file qpaintengine.h.
Definition at line 277 of file qpaintengine.h.
Referenced by QPreviewPaintEngine::begin(), QAlphaPaintEngine::flushAndInit(), and QPreviewPaintEngine::newPage().
|
friend |
Definition at line 278 of file qpaintengine.h.
|
friend |
Definition at line 253 of file qpaintengine.h.
|
friend |
Definition at line 284 of file qpaintengine.h.
|
friend |
Definition at line 272 of file qpaintengine.h.
|
friend |
Definition at line 266 of file qpaintengine.h.
|
friend |
Definition at line 270 of file qpaintengine.h.
|
friend |
Definition at line 271 of file qpaintengine.h.
Definition at line 279 of file qpaintengine.h.
|
friend |
Definition at line 280 of file qpaintengine.h.
|
friend |
Definition at line 281 of file qpaintengine.h.
|
friend |
Definition at line 282 of file qpaintengine.h.
|
friend |
Definition at line 285 of file qpaintengine.h.
|
protected |
Definition at line 242 of file qpaintengine.h.
|
protected |
Definition at line 246 of file qpaintengine.h.
Referenced by QPaintBuffer::beginNewFrame(), QPicture::data_ptr(), QPaintBuffer::numFrames(), QPainterReplayer::process(), and QPaintEngine().
|
protected |
Definition at line 244 of file qpaintengine.h.
Referenced by QPaintEngineEx::QPaintEngineEx().
|
protected |
Definition at line 240 of file qpaintengine.h.
Referenced by QDirectFBPaintEngine::begin(), QAlphaPaintEngine::begin(), QAlphaPaintEngine::flushAndInit(), QRasterPaintEngine::init(), QMacPrintEnginePrivate::initialize(), and QCoreGraphicsPaintEngine::updateBrush().
|
protected |
Definition at line 243 of file qpaintengine.h.
|
protected |
Definition at line 239 of file qpaintengine.h.
Referenced by QtopiaPrintEngine::begin(), QMacPrintEngine::begin(), QProxyFontEngine::canRender(), QWin32PrintEnginePrivate::doReinit(), QFontEngineQPF::draw(), QFontEngineQPF1::draw(), QCoreGraphicsPaintEngine::drawEllipse(), QCoreGraphicsPaintEngine::drawImage(), QCoreGraphicsPaintEngine::drawLines(), drawLines(), QCoreGraphicsPaintEngine::drawPath(), QCoreGraphicsPaintEngine::drawPixmap(), QCoreGraphicsPaintEngine::drawPoints(), QCoreGraphicsPaintEngine::drawPolygon(), QCoreGraphicsPaintEngine::drawRects(), drawRects(), QWin32PrintEngine::drawTextItem(), QCoreGraphicsPaintEngine::drawTextItem(), drawTextItem(), QCoreGraphicsPaintEngine::drawTiledPixmap(), QMacPrintEnginePrivate::initialize(), QPreviewPaintEngine::newPage(), QMacPrintEnginePrivate::newPage_helper(), painter(), QEmulationPaintEngine::QEmulationPaintEngine(), QEmulationPaintEngine::setState(), QPaintEngineEx::setState(), QEmulationPaintEngine::state(), QPaintEngineEx::state(), syncState(), QtopiaPrintEngine::type(), QMacPrintEngine::type(), QPainterPrivate::updateState(), and QPainterPrivate::updateStateImpl().