Hot Door CORE 0.8.2
Adobe® Illustrator® Plug-in Library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
hdi::core::Color Class Reference

Describes an RGB color, with opacity, typically for UI purposes. More...

#include <hdicoreColor.h>

Public Member Functions

 Color ()
 Default Color constructor; makes a black and fully opaque color.
 
 Color (const double r_, const double g_, const double b_, const double o_=1.0)
 Color constructor, taking an argument for each channel.
 
 Color (const Color &c_)
 Color copy constructor.
 
virtual ~Color ()
 Color destructor.
 
virtual void lighten (const double percentage_)
 Lightens the color by a percentage.
 
virtual void darken (const double percentage_)
 Darkens the color by a percentage.
 
virtual Coloroperator= (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 the same as another.
 
virtual bool operator!= (const Color &rhs_) const
 Tests whether a given Color object is not the same as another.
 

Static Public Member Functions

static Color red ()
 Static accessor to get a pure red Color object.
 
static Color orange ()
 Static accessor to get a pure orange Color object.
 
static Color yellow ()
 Static accessor to get a pure yellow Color object.
 
static Color green ()
 Static accessor to get a pure green Color object.
 
static Color cyan ()
 Static accessor to get a pure cyan Color object.
 
static Color blue ()
 Static accessor to get a pure blue Color object.
 
static Color purple ()
 Static accessor to get a pure purple Color object.
 
static Color magenta ()
 Static accessor to get a pure magenta Color object.
 
static Color white ()
 Static accessor to get a pure white Color object.
 
static Color lightGray ()
 Static accessor to get a light gray Color object.
 
static Color gray ()
 Static accessor to get a neutral gray Color object.
 
static Color darkGray ()
 Static accessor to get a dark gray Color object.
 
static Color black ()
 Static accessor to get a pure black Color object.
 

Public Attributes

double r
 Red channel, in range [0.0, 1.0].
 
double g
 Green channel, in range [0.0, 1.0].
 
double b
 Blue channel, in range [0.0, 1.0].
 
double opacity
 Alpha channel, in range [0.0, 1.0].
 

Friends

aip::Color * __accessImpl (const Color &)
 
Color __accessCtor (const aip::Color &)
 

Detailed Description

Describes an RGB color, with opacity, typically for UI purposes.

Constructor & Destructor Documentation

◆ Color() [1/3]

hdi::core::Color::Color ( )

Default Color constructor; makes a black and fully opaque color.

Author
GW
Date
08/2013

◆ Color() [2/3]

hdi::core::Color::Color ( const double  r_,
const double  g_,
const double  b_,
const double  o_ = 1.0 
)

Color constructor, taking an argument for each channel.

Author
GW
Date
08/2013
Parameters
r_Value for red channel, in range [0.0, 1.0]
g_Value for green channel, in range [0.0, 1.0]
b_Value for blue channel, in range [0.0, 1.0]
o_Value for alpha channel, in range [0.0, 1.0]

◆ Color() [3/3]

hdi::core::Color::Color ( const Color c_)

Color copy constructor.

Author
GW
Date
08/2013
Parameters
c_Existing Color object to copy values from

◆ ~Color()

virtual hdi::core::Color::~Color ( )
virtual

Color destructor.

Author
GW
Date
08/2013

Member Function Documentation

◆ black()

static Color hdi::core::Color::black ( )
static

Static accessor to get a pure black Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure black

◆ blue()

static Color hdi::core::Color::blue ( )
static

Static accessor to get a pure blue Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure blue

◆ cyan()

static Color hdi::core::Color::cyan ( )
static

Static accessor to get a pure cyan Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure cyan

◆ darken()

virtual void hdi::core::Color::darken ( const double  percentage_)
virtual

Darkens the color by a percentage.

Author
GW
Date
08/2013
Parameters
percentage_Amount to darken the color, in range [0.0, 1.0]

◆ darkGray()

static Color hdi::core::Color::darkGray ( )
static

Static accessor to get a dark gray Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to 75% black

◆ gray()

static Color hdi::core::Color::gray ( )
static

Static accessor to get a neutral gray Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to 50% black

◆ green()

static Color hdi::core::Color::green ( )
static

Static accessor to get a pure green Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure green

◆ lighten()

virtual void hdi::core::Color::lighten ( const double  percentage_)
virtual

Lightens the color by a percentage.

Author
GW
Date
08/2013
Parameters
percentage_Amount to lighten the color, in range [0.0, 1.0]

◆ lightGray()

static Color hdi::core::Color::lightGray ( )
static

Static accessor to get a light gray Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to 25% black

◆ magenta()

static Color hdi::core::Color::magenta ( )
static

Static accessor to get a pure magenta Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure magenta

◆ operator!=()

virtual bool hdi::core::Color::operator!= ( const Color rhs_) const
virtual

Tests whether a given Color object is not the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Color to compare against (righthand side of inequality operator)
Returns
true for the target and rhs_ being different colors, false otherwise

◆ operator=()

virtual Color & hdi::core::Color::operator= ( const Color rhs_)
virtual

Sets a Color object from another Color object.

Author
GW
Date
08/2013
Parameters
rhs_Color object to copy values from
Returns
The target object on the lefthand side of the = operator, with its values updated

◆ operator==()

virtual bool hdi::core::Color::operator== ( const Color rhs_) const
virtual

Tests whether a given Color object is the same as another.

Author
GW
Date
08/2013
Parameters
rhs_Color to compare against (righthand side of equality operator)
Returns
true for the target and rhs_ being the same color, false otherwise

◆ orange()

static Color hdi::core::Color::orange ( )
static

Static accessor to get a pure orange Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure orange

◆ purple()

static Color hdi::core::Color::purple ( )
static

Static accessor to get a pure purple Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure purple

◆ red()

static Color hdi::core::Color::red ( )
static

Static accessor to get a pure red Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure red

◆ white()

static Color hdi::core::Color::white ( )
static

Static accessor to get a pure white Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure white

◆ yellow()

static Color hdi::core::Color::yellow ( )
static

Static accessor to get a pure yellow Color object.

Author
GW
Date
08/2013
Returns
A Color object with its values set to pure yellow