QtBase  v6.3.1
Public Member Functions | Public Attributes | List of all members
TestPaintEngine Class Reference
Inheritance diagram for TestPaintEngine:
Inheritance graph
[legend]
Collaboration diagram for TestPaintEngine:
Collaboration graph
[legend]

Public Member Functions

void drawTextItem (const QPointF &p, const QTextItem &) override
 
void updateState (const QPaintEngineState &) override
 
void drawPolygon (const QPointF *, int, PolygonDrawMode) override
 
bool begin (QPaintDevice *) override
 
bool end () override
 
void drawPixmap (const QRectF &, const QPixmap &, const QRectF &) override
 
Type type () const override
 
- Public Member Functions inherited from QPaintEngine
 QPaintEngine (PaintEngineFeatures features=PaintEngineFeatures())
 
virtual ~QPaintEngine ()
 
bool isActive () const
 
void setActive (bool newState)
 
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 QPoint *points, int pointCount, PolygonDrawMode mode)
 
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)
 
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)
 

Public Attributes

QSet< int > differentVerticalPositions
 

Additional Inherited Members

- 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
}
 
- 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 838 of file tst_qstatictext.cpp.

Member Function Documentation

◆ begin()

bool TestPaintEngine::begin ( QPaintDevice pdev)
inlineoverridevirtual

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 850 of file tst_qstatictext.cpp.

◆ drawPixmap()

void TestPaintEngine::drawPixmap ( const QRectF r,
const QPixmap pm,
const QRectF sr 
)
inlineoverridevirtual

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

Implements QPaintEngine.

Definition at line 852 of file tst_qstatictext.cpp.

◆ drawPolygon()

void TestPaintEngine::drawPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
inlineoverridevirtual

Reimplement this virtual function to draw the polygon defined by the pointCount first points in points, using mode mode.

Note
At least one of the drawPolygon() functions must be reimplemented.

Reimplemented from QPaintEngine.

Definition at line 848 of file tst_qstatictext.cpp.

◆ drawTextItem()

void TestPaintEngine::drawTextItem ( const QPointF p,
const QTextItem textItem 
)
inlineoverridevirtual

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 841 of file tst_qstatictext.cpp.

Here is the call graph for this function:

◆ end()

bool TestPaintEngine::end ( )
inlineoverridevirtual

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 851 of file tst_qstatictext.cpp.

◆ type()

Type TestPaintEngine::type ( ) const
inlineoverridevirtual

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

Implements QPaintEngine.

Definition at line 853 of file tst_qstatictext.cpp.

◆ updateState()

void TestPaintEngine::updateState ( const QPaintEngineState state)
inlineoverridevirtual

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 \l {GetFunction}{get function} to retrieve the current values for the given properties.

See also
QPaintEngineState

Implements QPaintEngine.

Definition at line 846 of file tst_qstatictext.cpp.

Member Data Documentation

◆ differentVerticalPositions

QSet<int> TestPaintEngine::differentVerticalPositions

Definition at line 858 of file tst_qstatictext.cpp.


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