7#ifndef __HDI_CORE_COLOR__
8#define __HDI_CORE_COLOR__
14 #if defined(HDI_CORE_AIP_MODE)
19 #elif defined(HDI_CORE_PSP_MODE)
71 Color(
const double r_,
const double g_,
const double b_,
const double o_ = 1.0);
96 virtual void lighten(
const double percentage_);
105 virtual void darken(
const double percentage_);
256 #if defined(HDI_CORE_AIP_MODE)
257 friend aip::Color* __accessImpl(
const Color&);
258 friend Color __accessCtor(
const aip::Color&);
270 Color(
const aip::Color&);
271 #elif defined(HDI_CORE_PSP_MODE)
272 friend psp::Color* __accessImpl(
const Color&);
273 friend Color __accessCtor(
const psp::Color&);
285 Color(
const psp::Color&);
290 typedef std::unique_ptr<Color> ColorUP;
291 typedef std::shared_ptr<Color> ColorSP;
292 typedef std::weak_ptr<Color> ColorWP;
294 #if defined(HDI_CORE_AIP_MODE)
295 extern aip::Color* __accessImpl(
const Color&);
296 extern Color __accessCtor(
const aip::Color&);
297 #elif defined(HDI_CORE_PSP_MODE)
298 extern psp::Color* __accessImpl(
const Color&);
299 extern Color __accessCtor(
const psp::Color&);
Describes an RGB color, with opacity, typically for UI purposes.
Definition: hdicoreColor.h:32
static Color black()
Static accessor to get a pure black Color object.
static Color purple()
Static accessor to get a pure purple Color object.
double g
Green channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:42
virtual void lighten(const double percentage_)
Lightens the color by a percentage.
static Color white()
Static accessor to get a pure white Color object.
static Color cyan()
Static accessor to get a pure cyan Color object.
static Color yellow()
Static accessor to get a pure yellow Color object.
virtual Color & operator=(const Color &rhs_)
Sets a Color object from another Color object.
virtual bool operator!=(const Color &rhs_) const
Tests whether a given Color object is not the same as another.
static Color red()
Static accessor to get a pure red Color object.
double r
Red channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:37
virtual ~Color()
Color destructor.
Color(const Color &c_)
Color copy constructor.
Color()
Default Color constructor; makes a black and fully opaque color.
static Color magenta()
Static accessor to get a pure magenta Color object.
static Color orange()
Static accessor to get a pure orange Color object.
virtual bool operator==(const Color &rhs_) const
Tests whether a given Color object is the same as another.
static Color darkGray()
Static accessor to get a dark gray Color object.
static Color lightGray()
Static accessor to get a light gray Color object.
Color(const double r_, const double g_, const double b_, const double o_=1.0)
Color constructor, taking an argument for each channel.
static Color gray()
Static accessor to get a neutral gray Color object.
double b
Blue channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:47
virtual void darken(const double percentage_)
Darkens the color by a percentage.
static Color blue()
Static accessor to get a pure blue Color object.
double opacity
Alpha channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:52
static Color green()
Static accessor to get a pure green Color object.