Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
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. More...
 
 Color (const double r_, const double g_, const double b_, const double o_=1.0)
 Color constructor, taking an argument for each channel. More...
 
 Color (const Color &c_)
 Color copy constructor. More...
 
virtual ~Color ()
 Color destructor. More...
 
virtual void lighten (const double percentage_)
 Lightens the color by a percentage. More...
 
virtual void darken (const double percentage_)
 Darkens the color by a percentage. More...
 
virtual Coloroperator= (const Color &rhs_)
 Sets a Color object from another Color object. More...
 
virtual bool operator== (const Color &rhs_) const
 Tests whether a given Color object is the same as another. More...
 
virtual bool operator!= (const Color &rhs_) const
 Tests whether a given Color object is not the same as another. More...
 

Static Public Member Functions

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

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

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

Detailed Description

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

Constructor & Destructor Documentation

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

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

Author
GW
Date
08/2013
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]
hdi::core::Color::Color ( const Color c_)

Color copy constructor.

Author
GW
Date
08/2013
Parameters
c_Existing Color object to copy values from
virtual hdi::core::Color::~Color ( )
virtual

Color destructor.

Author
GW
Date
08/2013

Member Function Documentation

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
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
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
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]
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
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
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
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]
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
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
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
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
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
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
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
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
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
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