QtBase  v6.3.1
Public Types | Public Member Functions | Friends | List of all members
QWindowsDirect2DPaintEngine Class Reference

#include <qwindowsdirect2dpaintengine.h>

Inheritance diagram for QWindowsDirect2DPaintEngine:
Inheritance graph
[legend]
Collaboration diagram for QWindowsDirect2DPaintEngine:
Collaboration graph
[legend]

Public Types

enum  Flag { NoFlag = 0 , TranslucentTopLevelWindow = 1 , EmulateComposition = 2 }
 
- Public Types inherited from QPaintEngineEx
enum  Flags { DoNotEmulate = 0x01 , IsEmulationEngine = 0x02 }
 
- Public Types inherited from QPaintEngine
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 , OpenGL , Picture ,
  SVG , Raster , Direct3D , Pdf ,
  OpenVG , OpenGL2 , PaintBuffer , Blitter ,
  Direct2D , User = 50 , MaxUser = 100
}
 

Public Member Functions

 QWindowsDirect2DPaintEngine (QWindowsDirect2DBitmap *bitmap, Flags flags)
 
bool begin (QPaintDevice *pdev) override
 
bool end () override
 
Type type () const override
 
void setState (QPainterState *s) override
 
void draw (const QVectorPath &path) override
 
void fill (const QVectorPath &path, const QBrush &brush) override
 
void fill (ID2D1Geometry *geometry, const QBrush &brush)
 
void stroke (const QVectorPath &path, const QPen &pen) override
 
void stroke (ID2D1Geometry *geometry, const QPen &pen)
 
void clip (const QVectorPath &path, Qt::ClipOperation op) override
 
void clipEnabledChanged () override
 
void penChanged () override
 
void brushChanged () override
 
void brushOriginChanged () override
 
void opacityChanged () override
 
void compositionModeChanged () override
 
void renderHintsChanged () override
 
void transformChanged () override
 
void fillRect (const QRectF &rect, const QBrush &brush) override
 
void drawRects (const QRect *rects, int rectCount) override
 
void drawRects (const QRectF *rects, int rectCount) override
 
void drawEllipse (const QRectF &r) override
 
void drawEllipse (const QRect &r) override
 
void drawImage (const QRectF &rectangle, const QImage &image, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 
void drawStaticTextItem (QStaticTextItem *staticTextItem) override
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 
- Public Member Functions inherited from QPaintEngineEx
 QPaintEngineEx ()
 
virtual QPainterStatecreateState (QPainterState *orig) const
 
virtual void clip (const QRect &rect, Qt::ClipOperation op)
 
virtual void clip (const QRegion &region, Qt::ClipOperation op)
 
virtual void clip (const QPainterPath &path, Qt::ClipOperation op)
 
virtual void fillRect (const QRectF &rect, const QColor &color)
 
virtual void drawRoundedRect (const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode)
 
virtual void drawLines (const QLine *lines, int lineCount) override
 
virtual void drawLines (const QLineF *lines, int lineCount) override
 
virtual void drawPath (const QPainterPath &path) override
 
virtual void drawPoints (const QPointF *points, int pointCount) override
 
virtual void drawPoints (const QPoint *points, int pointCount) override
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 
virtual void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) override
 
virtual void drawPixmap (const QPointF &pos, const QPixmap &pm)
 
virtual void drawImage (const QPointF &pos, const QImage &image)
 
virtual void drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s) override
 
virtual void drawPixmapFragments (const QPainter::PixmapFragment *fragments, int fragmentCount, const QPixmap &pixmap, QFlags< QPainter::PixmapFragmentHint > hints)
 
virtual void updateState (const QPaintEngineState &state) override
 
QPainterStatestate ()
 
const QPainterStatestate () const
 
virtual void sync ()
 
virtual void beginNativePainting ()
 
virtual void endNativePainting ()
 
virtual uint flags () const
 
virtual bool requiresPretransformedGlyphPositions (QFontEngine *fontEngine, const QTransform &m) const
 
virtual bool shouldDrawCachedGlyphs (QFontEngine *fontEngine, const QTransform &m) const
 
- Public Member Functions inherited from QPaintEngine
 QPaintEngine (PaintEngineFeatures features=PaintEngineFeatures())
 
virtual ~QPaintEngine ()
 
bool isActive () const
 
void setActive (bool newState)
 
void setPaintDevice (QPaintDevice *device)
 
QPaintDevicepaintDevice () const
 
void setSystemClip (const QRegion &baseClip)
 
QRegion systemClip () const
 
void setSystemRect (const QRect &rect)
 
QRect systemRect () const
 
virtual QPoint coordinateOffset () const
 
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
 
QPainterpainter () const
 
void syncState ()
 
bool isExtended () const
 
virtual QPixmap createPixmap (QSize size)
 
virtual QPixmap createPixmapFromImage (QImage image, Qt::ImageConversionFlags flags=Qt::AutoColor)
 

Friends

class QWindowsDirect2DPaintEngineSuspenderImpl
 
class QWindowsDirect2DPaintEngineSuspenderPrivate
 

Additional Inherited Members

- Protected Member Functions inherited from QPaintEngineEx
 QPaintEngineEx (QPaintEngineExPrivate &data)
 
- Protected Member Functions inherited from QPaintEngine
 QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=PaintEngineFeatures())
 
- Protected Attributes inherited from QPaintEngine
QPaintEngineStatestate
 
PaintEngineFeatures gccaps
 
uint active: 1
 
uint selfDestruct: 1
 
uint extended: 1
 
QScopedPointer< QPaintEnginePrivated_ptr
 

Detailed Description

Definition at line 53 of file qwindowsdirect2dpaintengine.h.

Member Enumeration Documentation

◆ Flag

Enumerator
NoFlag 
TranslucentTopLevelWindow 
EmulateComposition 

Definition at line 59 of file qwindowsdirect2dpaintengine.h.

Constructor & Destructor Documentation

◆ QWindowsDirect2DPaintEngine()

QWindowsDirect2DPaintEngine::QWindowsDirect2DPaintEngine ( QWindowsDirect2DBitmap bitmap,
Flags  flags 
)

Definition at line 1066 of file qwindowsdirect2dpaintengine.cpp.

Member Function Documentation

◆ begin()

bool QWindowsDirect2DPaintEngine::begin ( QPaintDevice pdev)
overridevirtual

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.

See also
end(), isActive()

Implements QPaintEngine.

Definition at line 1085 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ brushChanged()

void QWindowsDirect2DPaintEngine::brushChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1253 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ brushOriginChanged()

void QWindowsDirect2DPaintEngine::brushOriginChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1259 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clip()

void QWindowsDirect2DPaintEngine::clip ( const QVectorPath path,
Qt::ClipOperation  op 
)
overridevirtual

Implements QPaintEngineEx.

Definition at line 1235 of file qwindowsdirect2dpaintengine.cpp.

Here is the caller graph for this function:

◆ clipEnabledChanged()

void QWindowsDirect2DPaintEngine::clipEnabledChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1241 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compositionModeChanged()

void QWindowsDirect2DPaintEngine::compositionModeChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1271 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ draw()

void QWindowsDirect2DPaintEngine::draw ( const QVectorPath path)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1170 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ drawEllipse() [1/2]

void QWindowsDirect2DPaintEngine::drawEllipse ( const QRect rect)
overridevirtual

The default implementation of this function calls the floating point version of this function

Reimplemented from QPaintEngineEx.

Definition at line 1412 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ drawEllipse() [2/2]

void QWindowsDirect2DPaintEngine::drawEllipse ( const QRectF rect)
overridevirtual

Reimplement this function to draw the largest ellipse that can be contained within rectangle rect.

The default implementation calls drawPolygon().

Reimplemented from QPaintEngineEx.

Definition at line 1382 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ drawImage()

void QWindowsDirect2DPaintEngine::drawImage ( const QRectF rectangle,
const QImage image,
const QRectF sr,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
overridevirtual

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.

Implements QPaintEngineEx.

Definition at line 1442 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawPixmap()

void QWindowsDirect2DPaintEngine::drawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
)
overridevirtual

Reimplement this function to draw the part of the pm specified by the sr rectangle in the given r.

Implements QPaintEngineEx.

Definition at line 1452 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ drawRects() [1/2]

void QWindowsDirect2DPaintEngine::drawRects ( const QRect rects,
int  rectCount 
)
overridevirtual

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

The default implementation converts the first rectCount rectangles in the buffer rects to a QRectF and calls the floating point version of this function.

Reimplemented from QPaintEngineEx.

Definition at line 1307 of file qwindowsdirect2dpaintengine.cpp.

◆ drawRects() [2/2]

void QWindowsDirect2DPaintEngine::drawRects ( const QRectF rects,
int  rectCount 
)
overridevirtual

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 from QPaintEngineEx.

Definition at line 1335 of file qwindowsdirect2dpaintengine.cpp.

◆ drawStaticTextItem()

void QWindowsDirect2DPaintEngine::drawStaticTextItem ( QStaticTextItem staticTextItem)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1544 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ drawTextItem()

void QWindowsDirect2DPaintEngine::drawTextItem ( const QPointF p,
const QTextItem textItem 
)
overridevirtual

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 from QPaintEngine.

Definition at line 1591 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ end()

bool QWindowsDirect2DPaintEngine::end ( )
overridevirtual

Reimplement this function to finish painting on the current paint device. Return true if painting was finished successfully; otherwise return false.

See also
begin(), isActive()

Implements QPaintEngine.

Definition at line 1122 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ fill() [1/2]

void QWindowsDirect2DPaintEngine::fill ( const QVectorPath path,
const QBrush brush 
)
overridevirtual

Implements QPaintEngineEx.

Definition at line 1189 of file qwindowsdirect2dpaintengine.cpp.

Here is the caller graph for this function:

◆ fill() [2/2]

void QWindowsDirect2DPaintEngine::fill ( ID2D1Geometry *  geometry,
const QBrush brush 
)

◆ fillRect()

void QWindowsDirect2DPaintEngine::fillRect ( const QRectF rect,
const QBrush brush 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1289 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ opacityChanged()

void QWindowsDirect2DPaintEngine::opacityChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1265 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ penChanged()

void QWindowsDirect2DPaintEngine::penChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1247 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ renderHintsChanged()

void QWindowsDirect2DPaintEngine::renderHintsChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1277 of file qwindowsdirect2dpaintengine.cpp.

Here is the caller graph for this function:

◆ setState()

void QWindowsDirect2DPaintEngine::setState ( QPainterState s)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1153 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:

◆ stroke() [1/2]

void QWindowsDirect2DPaintEngine::stroke ( const QVectorPath path,
const QPen pen 
)
overridevirtual

Reimplemented from QPaintEngineEx.

Definition at line 1215 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ stroke() [2/2]

void QWindowsDirect2DPaintEngine::stroke ( ID2D1Geometry *  geometry,
const QPen pen 
)

◆ transformChanged()

void QWindowsDirect2DPaintEngine::transformChanged ( )
overridevirtual

Implements QPaintEngineEx.

Definition at line 1283 of file qwindowsdirect2dpaintengine.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ type()

QPaintEngine::Type QWindowsDirect2DPaintEngine::type ( ) const
overridevirtual

Reimplement this function to return the paint engine \l{Type}.

Implements QPaintEngine.

Definition at line 1148 of file qwindowsdirect2dpaintengine.cpp.

Friends And Related Function Documentation

◆ QWindowsDirect2DPaintEngineSuspenderImpl

Definition at line 56 of file qwindowsdirect2dpaintengine.h.

◆ QWindowsDirect2DPaintEngineSuspenderPrivate

Definition at line 57 of file qwindowsdirect2dpaintengine.h.


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