- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files
- Directories
- Examples

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends

# QPaintEngine Class Reference

Search for all occurrences

## Detailed Description

Definition at line 90 of file qpaintengine.h.

`#include <qpaintengine.h>`

List of all members.

## Public Types
enum | PaintEngineFeature { PrimitiveTransform = 0x00000001, PatternTransform = 0x00000002, PixmapTransform = 0x00000004, PatternBrush = 0x00000008, LinearGradientFill = 0x00000010, RadialGradientFill = 0x00000020, ConicalGradientFill = 0x00000040, AlphaBlend = 0x00000080, PorterDuff = 0x00000100, PainterPaths = 0x00000200, Antialiasing = 0x00000400, BrushStroke = 0x00000800, ConstantOpacity = 0x00001000, MaskedBrush = 0x00002000, PerspectiveTransform = 0x00004000, BlendModes = 0x00008000, ObjectBoundingModeGradients = 0x00010000, RasterOpModes = 0x00020000, PaintOutsidePaintEvent = 0x20000000, AllFeatures = 0xffffffff }
enum | DirtyFlag { DirtyPen = 0x0001, DirtyBrush = 0x0002, DirtyBrushOrigin = 0x0004, DirtyFont = 0x0008, DirtyBackground = 0x0010, DirtyBackgroundMode = 0x0020, DirtyTransform = 0x0040, DirtyClipRegion = 0x0080, DirtyClipPath = 0x0100, DirtyHints = 0x0200, DirtyCompositionMode = 0x0400, DirtyClipEnabled = 0x0800, DirtyOpacity = 0x1000, AllDirty = 0xffff }
enum | PolygonDrawMode { OddEvenMode, WindingMode, ConvexMode, PolylineMode }
enum | Type { X11, Windows, QuickDraw, CoreGraphics, MacPrinter, QWindowSystem, PostScript, OpenGL, Picture, SVG, Raster, Direct3D, Pdf, OpenVG, OpenGL2, PaintBuffer, User = 50, MaxUser = 100 }
## Public Member Functions
| QPaintEngine (PaintEngineFeatures features=0)
virtual | ~QPaintEngine ()
bool | isActive () const
void | setActive (bool newState)
virtual bool | begin (QPaintDevice *pdev)=0
virtual bool | end ()=0
virtual void | updateState (const QPaintEngineState &state)=0
virtual void | drawRects (const QRect *rects, int rectCount)
virtual void | drawRects (const QRectF *rects, int rectCount)
virtual void | drawLines (const QLine *lines, int lineCount)
virtual void | drawLines (const QLineF *lines, int lineCount)
virtual void | drawEllipse (const QRectF &r)
virtual void | drawEllipse (const QRect &r)
virtual void | drawPath (const QPainterPath &path)
virtual void | drawPoints (const QPointF *points, int pointCount)
virtual void | drawPoints (const QPoint *points, int pointCount)
virtual void | drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode)
virtual void | drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode)
virtual void | drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr)=0
virtual void | drawTextItem (const QPointF &p, const QTextItem &textItem)
virtual void | drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s)
virtual void | drawImage (const QRectF &r, const QImage &pm, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor)
void | setPaintDevice (QPaintDevice *device)
QPaintDevice * | paintDevice () const
void | setSystemClip (const QRegion &baseClip)
QRegion | systemClip () const
void | setSystemRect (const QRect &rect)
QRect | systemRect () const
virtual QPoint | coordinateOffset () const
virtual Type | type () const =0
void | fix_neg_rect (int *x, int *y, int *w, int *h)
bool | testDirty (DirtyFlags df)
void | setDirty (DirtyFlags df)
void | clearDirty (DirtyFlags df)
bool | hasFeature (PaintEngineFeatures feature) const
QPainter * | painter () const
void | syncState ()
bool | isExtended () const
## Protected Member Functions
| QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=0)
## Protected Attributes
QPaintEngineState * | state
PaintEngineFeatures | gccaps
uint | active: 1
uint | selfDestruct: 1
uint | extended: 1
QScopedPointer < QPaintEnginePrivate > | d_ptr
## Friends
class | QPainterReplayer
class | QFontEngineBox
class | QFontEngineMac
class | QFontEngineWin
class | QFontEngineFT
class | QFontEngineQPF1
class | QFontEngineQPF
class | QPSPrintEngine
class | QMacPrintEngine
class | QMacPrintEnginePrivate
class | QPainter
class | QPainterPrivate
class | QWidget
class | QWidgetPrivate
class | QWin32PaintEngine
class | QWin32PaintEnginePrivate
class | QMacCGContext
class | QPreviewPaintEngine
class | QX11GLPixmapData

## Member Enumeration Documentation

enum PaintEngineFeature

Search for all occurrences

Enumerator:

  PrimitiveTransform | Search for all occurrences
  PatternTransform | Search for all occurrences
  PixmapTransform | Search for all occurrences
  PatternBrush | Search for all occurrences
  LinearGradientFill | Search for all occurrences
  RadialGradientFill | Search for all occurrences
  ConicalGradientFill | Search for all occurrences
  AlphaBlend | Search for all occurrences
  PorterDuff | Search for all occurrences
  PainterPaths | Search for all occurrences
  Antialiasing | Search for all occurrences
  BrushStroke | Search for all occurrences
  ConstantOpacity | Search for all occurrences
  MaskedBrush | Search for all occurrences
  PerspectiveTransform | Search for all occurrences
  BlendModes | Search for all occurrences
  ObjectBoundingModeGradients | Search for all occurrences
  RasterOpModes | Search for all occurrences
  PaintOutsidePaintEvent | Search for all occurrences
  AllFeatures | Search for all occurrences

Definition at line 94 of file qpaintengine.h.

                                {
            PrimitiveTransform          = 0x00000001, // Can transform primitives brushes
            PatternTransform            = 0x00000002, // Can transform pattern brushes
            PixmapTransform             = 0x00000004, // Can transform pixmaps
            PatternBrush                = 0x00000008, // Can fill with pixmaps and standard patterns
            LinearGradientFill          = 0x00000010, // Can fill gradient areas
            RadialGradientFill          = 0x00000020, // Can render radial gradients
            ConicalGradientFill         = 0x00000040, // Can render conical gradients
            AlphaBlend                  = 0x00000080, // Can do source over alpha blend
            PorterDuff                  = 0x00000100, // Can do general porter duff compositions
            PainterPaths                = 0x00000200, // Can fill, outline and clip paths
            Antialiasing                = 0x00000400, // Can antialias lines
            BrushStroke                 = 0x00000800, // Can render brush based pens
            ConstantOpacity             = 0x00001000, // Can render at constant opacity
            MaskedBrush                 = 0x00002000, // Can fill with textures that has an alpha channel or mask
            PerspectiveTransform        = 0x00004000, // Can do perspective transformations
            BlendModes                  = 0x00008000, // Can do extended Porter&Duff composition
            ObjectBoundingModeGradients = 0x00010000, // Can do object bounding mode gradients
            RasterOpModes               = 0x00020000, // Can do logical raster operations
            PaintOutsidePaintEvent      = 0x20000000, // Engine is capable of painting outside paint events
            /*                          0x10000000, // Used for emulating
                                        QGradient::StretchToDevice,
                                        defined in qpainter.cpp

                                        0x40000000, // Used internally for emulating opaque backgrounds
            */

            AllFeatures               = 0xffffffff  // For convenience
        };

enum DirtyFlag

Search for all occurrences

Enumerator:

  DirtyPen | Search for all occurrences
  DirtyBrush | Search for all occurrences
  DirtyBrushOrigin | Search for all occurrences
  DirtyFont | Search for all occurrences
  DirtyBackground | Search for all occurrences
  DirtyBackgroundMode | Search for all occurrences
  DirtyTransform | Search for all occurrences
  DirtyClipRegion | Search for all occurrences
  DirtyClipPath | Search for all occurrences
  DirtyHints | Search for all occurrences
  DirtyCompositionMode | Search for all occurrences
  DirtyClipEnabled | Search for all occurrences
  DirtyOpacity | Search for all occurrences
  AllDirty | Search for all occurrences

Definition at line 125 of file qpaintengine.h.

                       {
            DirtyPen                = 0x0001,
            DirtyBrush              = 0x0002,
            DirtyBrushOrigin        = 0x0004,
            DirtyFont               = 0x0008,
            DirtyBackground         = 0x0010,
            DirtyBackgroundMode     = 0x0020,
            DirtyTransform          = 0x0040,
            DirtyClipRegion         = 0x0080,
            DirtyClipPath           = 0x0100,
            DirtyHints              = 0x0200,
            DirtyCompositionMode    = 0x0400,
            DirtyClipEnabled        = 0x0800,
            DirtyOpacity            = 0x1000,

            AllDirty                = 0xffff
        };

enum PolygonDrawMode

Search for all occurrences

Enumerator:

  OddEvenMode | Search for all occurrences
  WindingMode | Search for all occurrences
  ConvexMode | Search for all occurrences
  PolylineMode | Search for all occurrences

Definition at line 144 of file qpaintengine.h.

                             {
            OddEvenMode,
            WindingMode,
            ConvexMode,
            PolylineMode
        };

enum Type

Search for all occurrences

Enumerator:

  X11 | Search for all occurrences
  Windows | Search for all occurrences
  QuickDraw | Search for all occurrences
  CoreGraphics | Search for all occurrences
  MacPrinter | Search for all occurrences
  QWindowSystem | Search for all occurrences
  PostScript | Search for all occurrences
  OpenGL | Search for all occurrences
  Picture | Search for all occurrences
  SVG | Search for all occurrences
  Raster | Search for all occurrences
  Direct3D | Search for all occurrences
  Pdf | Search for all occurrences
  OpenVG | Search for all occurrences
  OpenGL2 | Search for all occurrences
  PaintBuffer | Search for all occurrences
  User | Search for all occurrences
  MaxUser | Search for all occurrences

Definition at line 201 of file qpaintengine.h.

                  {
            X11,
            Windows,
            QuickDraw, CoreGraphics, MacPrinter,
            QWindowSystem,
            PostScript,
            OpenGL,
            Picture,
            SVG,
            Raster,
            Direct3D,
            Pdf,
            OpenVG,
            OpenGL2,
            PaintBuffer,

            User = 50,    // first user type id
            MaxUser = 100 // last user type id
        };

## Constructor & Destructor Documentation

QPaintEngine | ( | PaintEngineFeatures | features = `0` | ) | `[explicit]`

virtual ~QPaintEngine | ( |  | ) | `[virtual]`

QPaintEngine | ( | QPaintEnginePrivate & | data,
|  | PaintEngineFeatures | devcaps = `0`
| ) |  | `[protected]`

## Member Function Documentation

bool isActive | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 154 of file qpaintengine.h.

    { return active; }

void setActive | ( | bool | newState | ) | `[inline]`

Search for all occurrences

Definition at line 155 of file qpaintengine.h.

    { active = newState; }

virtual bool begin | ( | QPaintDevice * | pdev | ) | `[pure virtual]`

Search for all occurrences

virtual bool end | ( |  | ) | `[pure virtual]`

Search for all occurrences

virtual void updateState | ( | const QPaintEngineState & | state | ) | `[pure virtual]`

Search for all occurrences

virtual void drawRects | ( | const QRect * | rects,
|  | int | rectCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawRects | ( | const QRectF * | rects,
|  | int | rectCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawLines | ( | const QLine * | lines,
|  | int | lineCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawLines | ( | const QLineF * | lines,
|  | int | lineCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawEllipse | ( | const QRectF & | r | ) | `[virtual]`

Search for all occurrences

virtual void drawEllipse | ( | const QRect & | r | ) | `[virtual]`

Search for all occurrences

virtual void drawPath | ( | const QPainterPath & | path | ) | `[virtual]`

Search for all occurrences

virtual void drawPoints | ( | const QPointF * | points,
|  | int | pointCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawPoints | ( | const QPoint * | points,
|  | int | pointCount
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawPolygon | ( | const QPointF * | points,
|  | int | pointCount,
|  | PolygonDrawMode | mode
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawPolygon | ( | const QPoint * | points,
|  | int | pointCount,
|  | PolygonDrawMode | mode
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawPixmap | ( | const QRectF & | r,
|  | const QPixmap & | pm,
|  | const QRectF & | sr
| ) |  | `[pure virtual]`

Search for all occurrences

virtual void drawTextItem | ( | const QPointF & | p,
|  | const QTextItem & | textItem
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawTiledPixmap | ( | const QRectF & | r,
|  | const QPixmap & | pixmap,
|  | const QPointF & | s
| ) |  | `[virtual]`

Search for all occurrences

virtual void drawImage | ( | const QRectF & | r,
|  | const QImage & | pm,
|  | const QRectF & | sr,
|  | Qt::ImageConversionFlags | flags = `Qt::AutoColor`
| ) |  | `[virtual]`

Search for all occurrences

void setPaintDevice | ( | QPaintDevice * | device | ) |

Search for all occurrences

QPaintDevice* paintDevice | ( |  | ) | const

Search for all occurrences

void setSystemClip | ( | const QRegion & | baseClip | ) |

Search for all occurrences

QRegion systemClip | ( |  | ) | const

Search for all occurrences

void setSystemRect | ( | const QRect & | rect | ) |

Search for all occurrences

QRect systemRect | ( |  | ) | const

Search for all occurrences

virtual QPoint coordinateOffset | ( |  | ) | const `[virtual]`

Search for all occurrences

virtual Type type | ( |  | ) | const `[pure virtual]`

Search for all occurrences

void fix_neg_rect | ( | int * | x,
|  | int * | y,
|  | int * | w,
|  | int * | h
| ) |  | `[inline]`

Search for all occurrences

Definition at line 328 of file qpaintengine.h.

    {
        if (*w < 0) {
            *w = -*w;
            *x -= *w - 1;
        }
        if (*h < 0) {
            *h = -*h;
            *y -= *h - 1;
        }
    }

bool testDirty | ( | DirtyFlags | df | ) | `[inline]`

Search for all occurrences

Definition at line 340 of file qpaintengine.h.

                                                     {
        Q_ASSERT(state);
        return ((state->dirtyFlags & df) != 0);
    }

void setDirty | ( | DirtyFlags | df | ) | `[inline]`

Search for all occurrences

Definition at line 345 of file qpaintengine.h.

                                                    {
        Q_ASSERT(state);
        state->dirtyFlags |= df;
    }

void clearDirty | ( | DirtyFlags | df | ) | `[inline]`

Search for all occurrences

Definition at line 350 of file qpaintengine.h.

    {
        Q_ASSERT(state);
        state->dirtyFlags &= ~static_cast<uint>(df);
    }

bool hasFeature | ( | PaintEngineFeatures | feature | ) | const `[inline]`

Search for all occurrences

Definition at line 228 of file qpaintengine.h.

    { return (gccaps & feature) != 0; }

QPainter* painter | ( |  | ) | const

Search for all occurrences

void syncState | ( |  | ) |

Search for all occurrences

bool isExtended | ( |  | ) | const `[inline]`

Search for all occurrences

Definition at line 233 of file qpaintengine.h.

    { return extended; }

## Friends And Related Function Documentation

friend class QPainterReplayer `[friend]`

Search for all occurrences

Definition at line 252 of file qpaintengine.h.

friend class QFontEngineBox `[friend]`

Search for all occurrences

Definition at line 253 of file qpaintengine.h.

friend class QFontEngineMac `[friend]`

Search for all occurrences

Definition at line 254 of file qpaintengine.h.

friend class QFontEngineWin `[friend]`

Search for all occurrences

Definition at line 255 of file qpaintengine.h.

friend class QFontEngineFT `[friend]`

Search for all occurrences

Definition at line 257 of file qpaintengine.h.

friend class QFontEngineQPF1 `[friend]`

Search for all occurrences

Definition at line 260 of file qpaintengine.h.

friend class QFontEngineQPF `[friend]`

Search for all occurrences

Definition at line 263 of file qpaintengine.h.

friend class QPSPrintEngine `[friend]`

Search for all occurrences

Definition at line 265 of file qpaintengine.h.

friend class QMacPrintEngine `[friend]`

Search for all occurrences

Definition at line 266 of file qpaintengine.h.

friend class QMacPrintEnginePrivate `[friend]`

Search for all occurrences

Definition at line 267 of file qpaintengine.h.

friend class QPainter `[friend]`

Search for all occurrences

Definition at line 273 of file qpaintengine.h.

friend class QPainterPrivate `[friend]`

Search for all occurrences

Definition at line 274 of file qpaintengine.h.

friend class QWidget `[friend]`

Search for all occurrences

Definition at line 275 of file qpaintengine.h.

friend class QWidgetPrivate `[friend]`

Search for all occurrences

Definition at line 276 of file qpaintengine.h.

friend class QWin32PaintEngine `[friend]`

Search for all occurrences

Definition at line 277 of file qpaintengine.h.

friend class QWin32PaintEnginePrivate `[friend]`

Search for all occurrences

Definition at line 278 of file qpaintengine.h.

friend class QMacCGContext `[friend]`

Search for all occurrences

Definition at line 279 of file qpaintengine.h.

friend class QPreviewPaintEngine `[friend]`

Search for all occurrences

Definition at line 280 of file qpaintengine.h.

friend class QX11GLPixmapData `[friend]`

Search for all occurrences

Definition at line 281 of file qpaintengine.h.

## Member Data Documentation

QPaintEngineState* state `[protected]`

Search for all occurrences

Definition at line 238 of file qpaintengine.h.

PaintEngineFeatures gccaps `[protected]`

Search for all occurrences

Definition at line 239 of file qpaintengine.h.

uint active `[protected]`

Search for all occurrences

Definition at line 241 of file qpaintengine.h.

uint selfDestruct `[protected]`

Search for all occurrences

Definition at line 242 of file qpaintengine.h.

uint extended `[protected]`

Search for all occurrences

Definition at line 243 of file qpaintengine.h.

QScopedPointer<QPaintEnginePrivate> d_ptr `[protected]`

Search for all occurrences

Definition at line 245 of file qpaintengine.h.

The documentation for this class was generated from the following file:

- QtGui/qpaintengine.h

QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine
QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine QPaintEngine