QtBase  v6.3.1
Public Member Functions | Protected Member Functions | Friends | List of all members
QX11PaintEngine Class Reference

#include <qpaintengine_x11_p.h>

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

Public Member Functions

 QX11PaintEngine ()
 
 ~QX11PaintEngine ()
 
bool begin (QPaintDevice *pdev) override
 
bool end () override
 
void updateState (const QPaintEngineState &state) override
 
void updatePen (const QPen &pen)
 
void updateBrush (const QBrush &brush, const QPointF &pt)
 
void updateRenderHints (QPainter::RenderHints hints)
 
void updateFont (const QFont &font)
 
void updateMatrix (const QTransform &matrix)
 
void updateClipRegion_dev (const QRegion &region, Qt::ClipOperation op)
 
void drawLines (const QLine *lines, int lineCount) override
 
void drawLines (const QLineF *lines, int lineCount) override
 
void drawRects (const QRect *rects, int rectCount) override
 
void drawRects (const QRectF *rects, int rectCount) override
 
void drawPoints (const QPoint *points, int pointCount) override
 
void drawPoints (const QPointF *points, int pointCount) override
 
void drawEllipse (const QRect &r) override
 
void drawEllipse (const QRectF &r) override
 
virtual void drawPolygon (const QPointF *points, int pointCount, PolygonDrawMode mode) override
 
void drawPolygon (const QPoint *points, int pointCount, PolygonDrawMode mode) override
 
void drawPixmap (const QRectF &r, const QPixmap &pm, const QRectF &sr) override
 
void drawTiledPixmap (const QRectF &r, const QPixmap &pixmap, const QPointF &s) override
 
void drawPath (const QPainterPath &path) override
 
void drawTextItem (const QPointF &p, const QTextItem &textItem) override
 
void drawImage (const QRectF &r, const QImage &img, const QRectF &sr, Qt::ImageConversionFlags flags=Qt::AutoColor) override
 
virtual Drawable handle () const
 
Type type () const override
 
QPainter::RenderHints supportedRenderHints () 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)
 

Protected Member Functions

 QX11PaintEngine (QX11PaintEnginePrivate &dptr)
 
- Protected Member Functions inherited from QPaintEngine
 QPaintEngine (QPaintEnginePrivate &data, PaintEngineFeatures devcaps=PaintEngineFeatures())
 

Friends

class QPixmap
 
class QFontEngineBox
 
GC qt_x11_get_pen_gc (QPainter *)
 
GC qt_x11_get_brush_gc (QPainter *)
 

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 Attributes inherited from QPaintEngine
QPaintEngineStatestate
 
PaintEngineFeatures gccaps
 
uint active: 1
 
uint selfDestruct: 1
 
uint extended: 1
 
QScopedPointer< QPaintEnginePrivated_ptr
 

Detailed Description

Definition at line 58 of file qpaintengine_x11_p.h.

Constructor & Destructor Documentation

◆ QX11PaintEngine() [1/2]

QX11PaintEngine::QX11PaintEngine ( )

Definition at line 636 of file qpaintengine_x11.cpp.

◆ ~QX11PaintEngine()

QX11PaintEngine::~QX11PaintEngine ( )

Definition at line 650 of file qpaintengine_x11.cpp.

◆ QX11PaintEngine() [2/2]

QX11PaintEngine::QX11PaintEngine ( QX11PaintEnginePrivate dptr)
protected

Definition at line 643 of file qpaintengine_x11.cpp.

Member Function Documentation

◆ begin()

bool QX11PaintEngine::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 658 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawEllipse() [1/2]

void QX11PaintEngine::drawEllipse ( const QRect rect)
overridevirtual

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

Reimplemented from QPaintEngine.

Definition at line 1623 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawEllipse() [2/2]

void QX11PaintEngine::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 QPaintEngine.

Definition at line 1614 of file qpaintengine_x11.cpp.

◆ drawImage()

void QX11PaintEngine::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.

Reimplemented from QPaintEngine.

Definition at line 2054 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawLines() [1/2]

void QX11PaintEngine::drawLines ( const QLine lines,
int  lineCount 
)
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 lineCount lines in lines to a QLineF and calls the floating point version of this function.

Reimplemented from QPaintEngine.

Definition at line 834 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawLines() [2/2]

void QX11PaintEngine::drawLines ( const QLineF lines,
int  lineCount 
)
overridevirtual

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

Definition at line 874 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawPath()

void QX11PaintEngine::drawPath ( const QPainterPath path)
overridevirtual

The default implementation ignores the path and does nothing.

Reimplemented from QPaintEngine.

Definition at line 1939 of file qpaintengine_x11.cpp.

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

◆ drawPixmap()

void QX11PaintEngine::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 QPaintEngine.

Definition at line 2076 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawPoints() [1/2]

void QX11PaintEngine::drawPoints ( const QPoint points,
int  pointCount 
)
overridevirtual

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

Definition at line 1112 of file qpaintengine_x11.cpp.

◆ drawPoints() [2/2]

void QX11PaintEngine::drawPoints ( const QPointF points,
int  pointCount 
)
overridevirtual

Draws the first pointCount points in the buffer points

Reimplemented from QPaintEngine.

Definition at line 1170 of file qpaintengine_x11.cpp.

◆ drawPolygon() [1/2]

void QX11PaintEngine::drawPolygon ( const QPoint points,
int  pointCount,
PolygonDrawMode  mode 
)
inlineoverridevirtual

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

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 90 of file qpaintengine_x11_p.h.

Here is the call graph for this function:

◆ drawPolygon() [2/2]

void QX11PaintEngine::drawPolygon ( const QPointF points,
int  pointCount,
PolygonDrawMode  mode 
)
overridevirtual

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 1880 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawRects() [1/2]

void QX11PaintEngine::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 QPaintEngine.

Definition at line 985 of file qpaintengine_x11.cpp.

Here is the caller graph for this function:

◆ drawRects() [2/2]

void QX11PaintEngine::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 QPaintEngine.

Definition at line 928 of file qpaintengine_x11.cpp.

◆ drawTextItem()

void QX11PaintEngine::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 2425 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ drawTiledPixmap()

void QX11PaintEngine::drawTiledPixmap ( const QRectF rect,
const QPixmap pixmap,
const QPointF p 
)
overridevirtual

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

Definition at line 2278 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ end()

bool QX11PaintEngine::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 729 of file qpaintengine_x11.cpp.

◆ handle()

Drawable QX11PaintEngine::handle ( ) const
virtual

Definition at line 2267 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

◆ supportedRenderHints()

QPainter::RenderHints QX11PaintEngine::supportedRenderHints ( ) const

Definition at line 1229 of file qpaintengine_x11.cpp.

◆ type()

Type QX11PaintEngine::type ( ) const
inlineoverridevirtual

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

Implements QPaintEngine.

Definition at line 101 of file qpaintengine_x11_p.h.

◆ updateBrush()

void QX11PaintEngine::updateBrush ( const QBrush brush,
const QPointF pt 
)

Definition at line 1483 of file qpaintengine_x11.cpp.

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

◆ updateClipRegion_dev()

void QX11PaintEngine::updateClipRegion_dev ( const QRegion region,
Qt::ClipOperation  op 
)

Definition at line 2223 of file qpaintengine_x11.cpp.

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

◆ updateFont()

void QX11PaintEngine::updateFont ( const QFont font)

Definition at line 2263 of file qpaintengine_x11.cpp.

Here is the caller graph for this function:

◆ updateMatrix()

void QX11PaintEngine::updateMatrix ( const QTransform matrix)

Definition at line 2206 of file qpaintengine_x11.cpp.

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

◆ updatePen()

void QX11PaintEngine::updatePen ( const QPen pen)

Definition at line 1344 of file qpaintengine_x11.cpp.

Here is the caller graph for this function:

◆ updateRenderHints()

void QX11PaintEngine::updateRenderHints ( QPainter::RenderHints  hints)

Definition at line 1330 of file qpaintengine_x11.cpp.

Here is the caller graph for this function:

◆ updateState()

void QX11PaintEngine::updateState ( const QPaintEngineState state)
overridevirtual

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 1238 of file qpaintengine_x11.cpp.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ QFontEngineBox

friend class QFontEngineBox
friend

Definition at line 114 of file qpaintengine_x11_p.h.

◆ QPixmap

friend class QPixmap
friend

Definition at line 113 of file qpaintengine_x11_p.h.

◆ qt_x11_get_brush_gc

GC qt_x11_get_brush_gc ( QPainter )
friend

Returns the X11 specific brush GC for the painter p. Note that QPainter::begin() must be called before this function returns a valid GC.

Definition at line 307 of file qpaintengine_x11.cpp.

◆ qt_x11_get_pen_gc

GC qt_x11_get_pen_gc ( QPainter )
friend

Returns the X11 specific pen GC for the painter p. Note that QPainter::begin() must be called before this function returns a valid GC.

Definition at line 292 of file qpaintengine_x11.cpp.


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