• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegames API Reference
  • KDE Home
  • Contact Us
 

libkdegames

Public Member Functions | Protected Member Functions | List of all members
QPaintDeviceColorProxy Class Reference

#include <colorproxy_p.h>

Inheritance diagram for QPaintDeviceColorProxy:
Inheritance graph
[legend]

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
 
- Public Member Functions inherited from QPaintDevice
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
 
- Protected Member Functions inherited from QPaintDevice
 QPaintDevice ()
 

Additional Inherited Members

- Static Public Member Functions inherited from QPaintDevice
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

QBrush QPaintDeviceColorProxy::map ( const QBrush &  brush) const
QColor QPaintDeviceColorProxy::map ( const QColor &  color) const
inline
QPen QPaintDeviceColorProxy::map ( const QPen &  pen) const
virtual int QPaintDeviceColorProxy::metric ( PaintDeviceMetric  metric) const
protectedvirtual

Reimplemented from QPaintDevice.

virtual QPaintEngine* QPaintDeviceColorProxy::paintEngine ( ) const
virtual
QPaintDevice* QPaintDeviceColorProxy::proxiedDevice ( ) const

The documentation for this class was generated from the following file:
  • colorproxy_p.h
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

KDE's Doxygen guidelines are available online.

libkdegames

Skip menu "libkdegames"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegames API Reference

Skip menu "kdegames API Reference"
  • granatier
  • kapman
  • kblackbox
  • kgoldrunner
  • kigo
  • kmahjongg
  • KShisen
  • ksquares
  • libkdegames
  •   highscore
  •   libkdegamesprivate
  •     kgame
  • libkmahjongg
  • palapeli
  •   libpala

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal