7#ifndef __HDI_CORE_COLOR__
8#define __HDI_CORE_COLOR__
14 #if defined(HDI_CORE_AIP_MODE)
19 #elif defined(HDI_CORE_PSP_MODE)
73 Color(
const double r_,
const double g_,
const double b_,
const double o_ = 1.0);
283 #if defined(HDI_CORE_AIP_MODE)
284 friend aip::Color* __accessImpl(
const Color&);
285 friend Color __accessCtor(
const aip::Color&);
297 Color(
const aip::Color&);
298 #elif defined(HDI_CORE_PSP_MODE)
299 friend psp::Color* __accessImpl(
const Color&);
300 friend Color __accessCtor(
const psp::Color&);
312 Color(
const psp::Color&);
317 typedef std::unique_ptr<Color> ColorUP;
318 typedef std::shared_ptr<Color> ColorSP;
319 typedef std::weak_ptr<Color> ColorWP;
321 #if defined(HDI_CORE_AIP_MODE)
322 extern aip::Color* __accessImpl(
const Color&);
323 extern Color __accessCtor(
const aip::Color&);
324 #elif defined(HDI_CORE_PSP_MODE)
325 extern psp::Color* __accessImpl(
const Color&);
326 extern Color __accessCtor(
const psp::Color&);
Describes the color of art on the artboard.
Definition hdicoreArtColor.h:42
Describes an RGB color, with opacity, typically for UI purposes.
Definition hdicoreColor.h:34
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:44
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.
Color(const ArtColor &c_)
Constructs a Color object from an existing ArtColor 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:39
virtual ~Color()
Color destructor.
Color(const Color &c_)
Color copy constructor.
Color()
Default Color constructor; makes a black and fully opaque color.
static Color clear()
Static accessor to get a Color object with opacity of 0.
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.
virtual Color lighten(const double percentage_) const
Lightens the color by a percentage.
virtual Color darken(const double percentage_) const
Darkens the color by a percentage.
double b
Blue channel, in range [0.0, 1.0].
Definition hdicoreColor.h:49
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:54
static Color green()
Static accessor to get a pure green Color object.