Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qpaintengine_x11.cpp File Reference

(02de77535f2a94cbeb7e0ea01895ba4e556e165c)

#include <QtCore/qrandom.h>
#include <private/qpixmapcache_p.h>
#include <private/qpaintengine_p.h>
#include <private/qpainterpath_p.h>
#include <private/qdrawhelper_p.h>
#include <private/qfontengineglyphcache_p.h>
#include "qpaintengine_x11_p.h"
#include "qpolygonclipper_p.h"
#include "qtessellator_p.h"
#include "qpixmap_x11_p.h"
#include "qcolormap_x11_p.h"
#include "qt_x11_p.h"
#include "qxcbexport.h"
#include "qxcbnativepainting.h"
Include dependency graph for qpaintengine_x11.cpp:

Go to the source code of this file.

Classes

class  QX11PaintEnginePrivate
struct  QX11PaintEnginePrivate::qt_float_point
struct  HexString< T >
struct  QConcatenable< HexString< T > >

Macros

#define X11   qt_x11Data
#define DITHER_SIZE   16

Functions

QPixmap qt_pixmapForBrush (int brushStyle, bool invert)
QPixmap qt_toX11Pixmap (const QPixmap &pixmap)
Q_XCB_EXPORT Drawable qt_x11Handle (const QPaintDevice *pd)
static const QXcbX11Infoqt_x11Info (const QPaintDevice *pd)
GC Q_XCB_EXPORT qt_x11_get_pen_gc (QPainter *p)
 Returns the X11 specific pen GC for the painter p.
GC Q_XCB_EXPORT qt_x11_get_brush_gc (QPainter *p)
 Returns the X11 specific brush GC for the painter p.
static void x11SetClipRegion (Display *dpy, GC gc, GC gc2, Qt::HANDLE picture, const QRegion &r)
static void x11ClearClipRegion (Display *dpy, GC gc, GC gc2, Qt::HANDLE picture)
static QPixmap qt_patternForAlpha (uchar alpha, int screen)
static QPaintEngine::PaintEngineFeatures qt_decide_features ()
static bool clipLine (QLineF *line, const QRect &rect)
static QLine clipStraightLine (const QRect &clip, const QLine &l)
static void setCapStyle (int cap_style, GC gc)
Q_GUI_EXPORT void qt_x11_drawImage (const QRect &rect, const QPoint &pos, const QImage &image, Drawable hd, GC gc, Display *dpy, Visual *visual, int depth)
void qt_draw_tile (QPaintEngine *, qreal, qreal, qreal, qreal, const QPixmap &, qreal, qreal)

Variables

static const qreal aliasedCoordinateDelta = 0.5 - 0.015625
static const uchar base_dither_matrix [DITHER_SIZE][DITHER_SIZE]

Macro Definition Documentation

◆ DITHER_SIZE

#define DITHER_SIZE   16

Definition at line 398 of file qpaintengine_x11.cpp.

◆ X11

#define X11   qt_x11Data

Definition at line 284 of file qpaintengine_x11.cpp.

Function Documentation

◆ clipLine()

bool clipLine ( QLineF * line,
const QRect & rect )
static

Definition at line 729 of file qpaintengine_x11.cpp.

◆ clipStraightLine()

QLine clipStraightLine ( const QRect & clip,
const QLine & l )
inlinestatic

Definition at line 876 of file qpaintengine_x11.cpp.

◆ qt_decide_features()

QPaintEngine::PaintEngineFeatures qt_decide_features ( )
static

Definition at line 575 of file qpaintengine_x11.cpp.

References QXcbX11Data::use_xrender.

◆ qt_draw_tile()

void qt_draw_tile ( QPaintEngine * gc,
qreal x,
qreal y,
qreal w,
qreal h,
const QPixmap & pixmap,
qreal xOffset,
qreal yOffset )
extern

Definition at line 519 of file qpaintengine.cpp.

◆ qt_patternForAlpha()

QPixmap qt_patternForAlpha ( uchar alpha,
int screen )
static

Definition at line 418 of file qpaintengine_x11.cpp.

References base_dither_matrix.

◆ qt_pixmapForBrush()

QPixmap qt_pixmapForBrush ( int brushStyle,
bool invert )
extern

Definition at line 80 of file qbrush.cpp.

◆ qt_toX11Pixmap()

QPixmap qt_toX11Pixmap ( const QPixmap & pixmap)
extern

Definition at line 63 of file qpixmap_x11.cpp.

◆ qt_x11_drawImage()

Q_GUI_EXPORT void qt_x11_drawImage ( const QRect & rect,
const QPoint & pos,
const QImage & image,
Drawable hd,
GC gc,
Display * dpy,
Visual * visual,
int depth )

Definition at line 1961 of file qpaintengine_x11.cpp.

References QXcbX11Info::display().

Here is the call graph for this function:

◆ qt_x11_get_brush_gc()

GC Q_XCB_EXPORT qt_x11_get_brush_gc ( QPainter * p)

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

◆ qt_x11_get_pen_gc()

GC Q_XCB_EXPORT qt_x11_get_pen_gc ( QPainter * p)

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

◆ qt_x11Handle()

Q_XCB_EXPORT Drawable qt_x11Handle ( const QPaintDevice * pd)

Definition at line 220 of file qpaintengine_x11.cpp.

◆ qt_x11Info()

const QXcbX11Info * qt_x11Info ( const QPaintDevice * pd)
static

Definition at line 235 of file qpaintengine_x11.cpp.

References QX11PlatformPixmap::qt_x11Info.

Here is the call graph for this function:

◆ setCapStyle()

void setCapStyle ( int cap_style,
GC gc )
inlinestatic

Definition at line 1071 of file qpaintengine_x11.cpp.

References QXcbX11Info::display().

Here is the call graph for this function:

◆ x11ClearClipRegion()

void x11ClearClipRegion ( Display * dpy,
GC gc,
GC gc2,
Qt::HANDLE picture )
inlinestatic

Definition at line 373 of file qpaintengine_x11.cpp.

◆ x11SetClipRegion()

void x11SetClipRegion ( Display * dpy,
GC gc,
GC gc2,
Qt::HANDLE picture,
const QRegion & r )
inlinestatic

Definition at line 346 of file qpaintengine_x11.cpp.

Variable Documentation

◆ aliasedCoordinateDelta

const qreal aliasedCoordinateDelta = 0.5 - 0.015625
static

Definition at line 250 of file qpaintengine_x11.cpp.

◆ base_dither_matrix

const uchar base_dither_matrix
static
Initial value:
= {
{ 0,192, 48,240, 12,204, 60,252, 3,195, 51,243, 15,207, 63,255 },
{ 128, 64,176,112,140, 76,188,124,131, 67,179,115,143, 79,191,127 },
{ 32,224, 16,208, 44,236, 28,220, 35,227, 19,211, 47,239, 31,223 },
{ 160, 96,144, 80,172,108,156, 92,163, 99,147, 83,175,111,159, 95 },
{ 8,200, 56,248, 4,196, 52,244, 11,203, 59,251, 7,199, 55,247 },
{ 136, 72,184,120,132, 68,180,116,139, 75,187,123,135, 71,183,119 },
{ 40,232, 24,216, 36,228, 20,212, 43,235, 27,219, 39,231, 23,215 },
{ 168,104,152, 88,164,100,148, 84,171,107,155, 91,167,103,151, 87 },
{ 2,194, 50,242, 14,206, 62,254, 1,193, 49,241, 13,205, 61,253 },
{ 130, 66,178,114,142, 78,190,126,129, 65,177,113,141, 77,189,125 },
{ 34,226, 18,210, 46,238, 30,222, 33,225, 17,209, 45,237, 29,221 },
{ 162, 98,146, 82,174,110,158, 94,161, 97,145, 81,173,109,157, 93 },
{ 10,202, 58,250, 6,198, 54,246, 9,201, 57,249, 5,197, 53,245 },
{ 138, 74,186,122,134, 70,182,118,137, 73,185,121,133, 69,181,117 },
{ 42,234, 26,218, 38,230, 22,214, 41,233, 25,217, 37,229, 21,213 },
{ 170,106,154, 90,166,102,150, 86,169,105,153, 89,165,101,149, 85 }
}

Definition at line 399 of file qpaintengine_x11.cpp.

Referenced by qt_patternForAlpha().