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 |
Protected Member Functions | |
virtual int | metric (PaintDeviceMetric metric) const |
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
QBrush QPaintDeviceColorProxy::map | ( | const QBrush & | brush | ) | const |
|
inline |
QPen QPaintDeviceColorProxy::map | ( | const QPen & | pen | ) | const |
|
protectedvirtual |
|
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-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:44:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.