bpp-core
2.2.0
|
Provide tools to deal with color objects. More...
#include <Bpp/Graphics/ColorTools.h>
Public Member Functions | |
ColorTools () | |
virtual | ~ColorTools () |
Static Public Member Functions | |
static std::vector< RGBColor > | gradient (unsigned int n, const RGBColor &low, const RGBColor &high) |
Create a set of colors according to a gradient defined by two extrema. More... | |
static std::vector< RGBColor > | gradient (unsigned int n, const RGBColor &low, const RGBColor &mid, const RGBColor &high) |
Create a set of colors according to a gradient defined by two extrema and a midpoint. More... | |
static RGBColor | gray (double level) |
static RGBColor | cmyk2rgb (double c, double m, double y, double k) |
Get a RGBColor from a cyan-magenta-yellow-key description. More... | |
Static Public Attributes | |
static const RGBColor | RED = RGBColor(255,0,0) |
static const RGBColor | GREEN = RGBColor(0,255,0) |
static const RGBColor | BLUE = RGBColor(0,0,255) |
static const RGBColor | BLACK = RGBColor(0,0,0) |
static const RGBColor | WHITE = RGBColor(255,255,255) |
static const RGBColor | YELLOW = RGBColor(255,255,0) |
static const RGBColor | CYAN = RGBColor(0,255,255) |
static const RGBColor | MAGENTA = RGBColor(255,0,255) |
static const RGBColor | ORANGE = RGBColor(255,127,0) |
Provide tools to deal with color objects.
Definition at line 53 of file ColorTools.h.
|
inline |
Definition at line 56 of file ColorTools.h.
|
inlinevirtual |
Definition at line 57 of file ColorTools.h.
|
inlinestatic |
Get a RGBColor from a cyan-magenta-yellow-key description.
The following formula are used for the transformation:
c | Cyan proportion. |
m | Magenta proportion. |
y | Yellow proportion. |
k | Black proportion. |
Definition at line 109 of file ColorTools.h.
|
static |
Create a set of colors according to a gradient defined by two extrema.
n | Number of colors to output. |
low | First color in gradient. |
high | Last color in gradient. |
Definition at line 57 of file ColorTools.cpp.
|
static |
Create a set of colors according to a gradient defined by two extrema and a midpoint.
n | Number of colors to output. |
low | First color in gradient. |
mid | Midpoint color. |
high | Last color in gradient. |
Definition at line 87 of file ColorTools.cpp.
|
inlinestatic |
level | Gray intensity ([0,1]). |
Definition at line 85 of file ColorTools.h.
Definition at line 121 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 120 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 124 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 119 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 125 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 126 of file ColorTools.h.
Definition at line 118 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 122 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().
Definition at line 123 of file ColorTools.h.
Referenced by bpp::DefaultColorSet::DefaultColorSet(), bpp::PgfGraphicDevice::PgfGraphicDevice(), and bpp::XFigColorManager::XFigColorManager().