qimageblitz
InlineHSV Class Reference
HSV to RGB conversion is required often for some algorithms. More...
#include <inlinehsv.h>
Public Member Functions | |
| InlineHSV () | |
| int | blue () |
| void | convertHSV2RGB () |
| void | convertHSV2RGB (int hue, int saturation, int value) |
| void | convertRGB2HSV (int red, int green, int blue) |
| void | convertRGB2HSV (unsigned int rgb) |
| int | green () |
| int | hue () |
| int | red () |
| int | saturation () |
| void | setBlue (int blue) |
| void | setGreen (int green) |
| void | setHSV (int hue, int saturation, int value) |
| void | setHue (int hue) |
| void | setRed (int red) |
| void | setRGB (int red, int green, int blue) |
| void | setSaturation (int saturation) |
| void | setValue (int value) |
| int | value () |
Detailed Description
HSV to RGB conversion is required often for some algorithms.
This class inlines, (at least with gcc), most of the code required for this conversion in order to increase performance in loops. The idea is you create an instance of this class outside your main loop then call convertRGB2HSV() and convertHSV2RGB when you need it.
Definition at line 42 of file inlinehsv.h.
Constructor & Destructor Documentation
| InlineHSV::InlineHSV | ( | ) | [inline] |
Definition at line 45 of file inlinehsv.h.
Member Function Documentation
| int InlineHSV::blue | ( | ) | [inline] |
Definition at line 80 of file inlinehsv.h.
| void InlineHSV::convertHSV2RGB | ( | ) | [inline] |
Converts the current hue, saturation, and value settings to RGB.
Definition at line 133 of file inlinehsv.h.
| void InlineHSV::convertHSV2RGB | ( | int | hue, | |
| int | saturation, | |||
| int | value | |||
| ) | [inline] |
Converts the given HSV value to RGB.
The red(), green(), and blue() methods will be valid after calling this. The hue, saturation, and value methods are also set to the supplied values.
Definition at line 127 of file inlinehsv.h.
| void InlineHSV::convertRGB2HSV | ( | int | red, | |
| int | green, | |||
| int | blue | |||
| ) | [inline] |
Definition at line 93 of file inlinehsv.h.
| void InlineHSV::convertRGB2HSV | ( | unsigned int | rgb | ) | [inline] |
Converts the given RGB value to HSV.
The hue(), saturation(), and value() methods will be valid after calling this. The red, green, and blue items are also set the the supplied values.
Definition at line 88 of file inlinehsv.h.
| int InlineHSV::green | ( | ) | [inline] |
Definition at line 79 of file inlinehsv.h.
| int InlineHSV::hue | ( | ) | [inline] |
Definition at line 69 of file inlinehsv.h.
| int InlineHSV::red | ( | ) | [inline] |
Definition at line 78 of file inlinehsv.h.
| int InlineHSV::saturation | ( | ) | [inline] |
Definition at line 70 of file inlinehsv.h.
| void InlineHSV::setBlue | ( | int | blue | ) | [inline] |
Definition at line 77 of file inlinehsv.h.
| void InlineHSV::setGreen | ( | int | green | ) | [inline] |
Definition at line 76 of file inlinehsv.h.
| void InlineHSV::setHSV | ( | int | hue, | |
| int | saturation, | |||
| int | value | |||
| ) | [inline] |
Definition at line 64 of file inlinehsv.h.
| void InlineHSV::setHue | ( | int | hue | ) | [inline] |
Definition at line 66 of file inlinehsv.h.
| void InlineHSV::setRed | ( | int | red | ) | [inline] |
Definition at line 75 of file inlinehsv.h.
| void InlineHSV::setRGB | ( | int | red, | |
| int | green, | |||
| int | blue | |||
| ) | [inline] |
Definition at line 73 of file inlinehsv.h.
| void InlineHSV::setSaturation | ( | int | saturation | ) | [inline] |
Definition at line 67 of file inlinehsv.h.
| void InlineHSV::setValue | ( | int | value | ) | [inline] |
Definition at line 68 of file inlinehsv.h.
| int InlineHSV::value | ( | ) | [inline] |
Definition at line 71 of file inlinehsv.h.
The documentation for this class was generated from the following file:
KDE 4.4 API Reference