#include <vcolor.h>
Public Types | |
| enum | VColorSpace { rgb = 0 , cmyk = 1 , hsb = 2 , gray = 3 } |
Public Member Functions | |
| VColor (VColorSpace colorSpace=rgb) | |
| VColor (const VColor &color) | |
| VColor (const TQColor &color) | |
| operator TQColor () const | |
| float | operator[] (unsigned i) const |
| void | set (float v1) |
| void | set (float v1, float v2) |
| void | set (float v1, float v2, float v3) |
| void | set (float v1, float v2, float v3, float v4) |
| float | opacity () const |
| void | setOpacity (float opacity) |
| VColorSpace | colorSpace () const |
| void | setColorSpace (const VColorSpace colorSpace, bool convert=true) |
| void | save (TQDomElement &element) const |
| void | load (const TQDomElement &element) |
Detailed Description
This class keeps track of color properties.
The actual color values can be represented in rgb and hsv color spaces. Also each color has a related opacity value.
Default is opaque, rgb, black color.
Member Enumeration Documentation
◆ VColorSpace
| enum VColor::VColorSpace |
Constructor & Destructor Documentation
◆ VColor() [1/3]
| VColor::VColor | ( | VColorSpace | colorSpace = rgb | ) |
Constructs a new VColor with the specified colorspace.
- Parameters
-
colorSpace the colorspace of the new color
Definition at line 28 of file vcolor.cpp.
◆ VColor() [2/3]
| VColor::VColor | ( | const VColor & | color | ) |
Constructs a new VColor by copying data from the specified VColor.
- Parameters
-
color the color to copy from
Definition at line 39 of file vcolor.cpp.
◆ VColor() [3/3]
| VColor::VColor | ( | const TQColor & | color | ) |
Constructs a new VColor by copying data from the specified TQColor.
- Parameters
-
color the color to copy from
Definition at line 50 of file vcolor.cpp.
Member Function Documentation
◆ colorSpace()
|
inline |
◆ load()
| void VColor::load | ( | const TQDomElement & | element | ) |
Load this color's state from xml and initialize it accordingly.
- Parameters
-
element the DOM element from which the attributes are read
Definition at line 321 of file vcolor.cpp.
◆ opacity()
|
inline |
◆ operator TQColor()
| VColor::operator TQColor | ( | ) | const |
Cast operator to TQColor.
Definition at line 60 of file vcolor.cpp.
◆ operator[]()
|
inline |
◆ save()
| void VColor::save | ( | TQDomElement & | element | ) | const |
Save this color's state to xml.
- Parameters
-
element the DOM element to which the attributes are saved
Definition at line 297 of file vcolor.cpp.
◆ set() [1/4]
|
inline |
◆ set() [2/4]
|
inline |
◆ set() [3/4]
|
inline |
◆ set() [4/4]
|
inline |
◆ setColorSpace()
| void VColor::setColorSpace | ( | const VColorSpace | colorSpace, |
| bool | convert = true ) |
Sets the color's colorspace.
The color is converted into the new colorspace by setting convert = true.
- Parameters
-
colorSpace the new colorspace convert controls if color is converted into new colorspace
Definition at line 72 of file vcolor.cpp.
◆ setOpacity()
|
inline |
The documentation for this class was generated from the following files:
