libkdegames
QPaintDeviceColorProxy Class Reference
#include <colorproxy_p.h>
Inheritance diagram for QPaintDeviceColorProxy:

Public Member Functions | |
QPaintDeviceColorProxy (QPaintDevice *proxiedDevice, const QHash< QColor, QColor > &replacements) | |
~QPaintDeviceColorProxy () | |
QBrush | map (const QBrush &brush) const |
QColor | map (const QColor &color) const |
QPen | map (const QPen &pen) const |
virtual QPaintEngine * | paintEngine () const |
QPaintDevice * | proxiedDevice () const |
![]() | |
virtual | ~QPaintDevice () |
int | colorCount () const |
int | depth () const |
int | height () const |
int | heightMM () const |
int | logicalDpiX () const |
int | logicalDpiY () const |
int | numColors () const |
virtual QPaintEngine * | paintEngine () const =0 |
bool | paintingActive () const |
int | physicalDpiX () const |
int | physicalDpiY () const |
int | width () const |
int | widthMM () const |
int | x11Cells () const |
Qt::HANDLE | x11Colormap () const |
bool | x11DefaultColormap () const |
bool | x11DefaultVisual () const |
int | x11Depth () const |
Display * | x11Display () const |
int | x11Screen () const |
void * | x11Visual () const |
Protected Member Functions | |
virtual int | metric (PaintDeviceMetric metric) const |
![]() | |
QPaintDevice () | |
Additional Inherited Members | |
![]() | |
int | x11AppCells (int screen) |
Qt::HANDLE | x11AppColormap (int screen) |
bool | x11AppDefaultColormap (int screen) |
bool | x11AppDefaultVisual (int screen) |
int | x11AppDepth (int screen) |
Display * | x11AppDisplay () |
int | x11AppDpiX (int screen) |
int | x11AppDpiY (int screen) |
Qt::HANDLE | x11AppRootWindow (int screen) |
int | x11AppScreen () |
void * | x11AppVisual (int screen) |
void | x11SetAppDpiX (int dpi, int screen) |
void | x11SetAppDpiY (int dpi, int screen) |
Detailed Description
This QPaintDevice forwards all painting operations performed on it to the contained QPaintDevice.
The only modification is that certain colors are replaced by others in all painting operations (except for drawImage and drawPixmap).
- Note
- Using this class results in a non-negligible performance penalty (~10-20% longer runtime), so use it only if the set of color replacements is non-empty.
Definition at line 46 of file colorproxy_p.h.
Constructor & Destructor Documentation
QPaintDeviceColorProxy::QPaintDeviceColorProxy | ( | QPaintDevice * | proxiedDevice, |
const QHash< QColor, QColor > & | replacements | ||
) |
- Warning
- Replacement loops (e.g. color1 -> color2 -> color3 -> color1) lead to infinite loops.
- You should not interact with the proxiedDevice during the lifetime of this instance.
QPaintDeviceColorProxy::~QPaintDeviceColorProxy | ( | ) |
Member Function Documentation
|
protectedvirtual |
Reimplemented from QPaintDevice.
|
virtual |
QPaintDevice* QPaintDeviceColorProxy::proxiedDevice | ( | ) | const |
The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.