#include <ACG/QtWidgets/QtColorTranslator.hh>
Public Member Functions | |
| QtColorTranslator () | |
| Default constructor. | |
| QtColorTranslator (QGLContext &_context) | |
| construct with QGLcontext | |
| ~QtColorTranslator () | |
| Destructor. | |
| void | initialize () |
| init (takes current QGLcontext) | |
| void | initialize (QGLContext &_context) |
| init with given QGLcontext | |
| bool | initialized () const |
| has it been initialized? | |
| bool | index2color (unsigned int _idx, QRgb &_col) const |
| index -> color (one buffer) | |
| bool | index2color (unsigned int _idx, QRgb &_frontColor, QRgb &_backColor) const |
| index -> color (two buffers) | |
| int | color2index (QRgb _c) const |
| color -> index (one buffer) | |
| int | color2index (QRgb _frontColor, QRgb _backColor) const |
| color -> index (two buffers) | |
| unsigned int | maxIndex () const |
| returns max convertable index (using ONE buffer) | |
Private Attributes | |
| bool | initialized_ |
| GLint | redBits_ |
| GLint | greenBits_ |
| GLint | blueBits_ |
| GLuint | redMask_ |
| GLuint | greenMask_ |
| GLuint | blueMask_ |
| GLuint | redShift_ |
| GLuint | greenShift_ |
| GLuint | blueShift_ |
| GLuint | redRound_ |
| GLuint | greenRound_ |
| GLuint | blueRound_ |
This class translates index <-> RGB color.
The QtColorTranslator is attached to a QGLContext and translates index to color and vice versa. If the RGB bits of one buffer are not sufficient, both front and back buffer can be used.
Definition at line 78 of file QtColorTranslator.hh.