Hot Door CORE  0.7.0
Adobe® Illustrator® Plug-in Library
hdicoreColor.h
Go to the documentation of this file.
1 
7 #ifndef __HDI_CORE_COLOR__
8 #define __HDI_CORE_COLOR__
9 
10 #include <memory>
11 
12 namespace hdi
13 {
14  namespace plugin
15  {
16  class Color;
17  }
18 
19  namespace core
20  {
24  class Color
25  {
26  public:
30  double r;
31 
35  double g;
36 
40  double b;
41 
45  double opacity;
46 
52  Color();
53 
64  Color(const double r_, const double g_, const double b_, const double o_ = 1.0);
65 
73  Color(const Color& c_);
74 
80  virtual ~Color();
81 
89  virtual void lighten(const double percentage_);
90 
98  virtual void darken(const double percentage_);
99 
108  virtual Color& operator=(const Color& rhs_);
109 
118  virtual bool operator==(const Color& rhs_) const;
119 
128  virtual bool operator!=(const Color& rhs_) const;
129 
137  static Color red();
138 
146  static Color orange();
147 
155  static Color yellow();
156 
164  static Color green();
165 
173  static Color cyan();
174 
182  static Color blue();
183 
191  static Color purple();
192 
200  static Color magenta();
201 
209  static Color white();
210 
218  static Color lightGray();
219 
227  static Color gray();
228 
236  static Color darkGray();
237 
245  static Color black();
246 
247 
248  private:
249  friend plugin::Color* __accessImpl(const Color&);
250  friend Color __accessCtor(const plugin::Color&);
251 
255  plugin::Color* __impl;
256 
262  Color(const plugin::Color&);
263  };
264 
265  typedef std::auto_ptr<Color> ColorAP;
266 
267  extern plugin::Color* __accessImpl(const Color&);
268  extern Color __accessCtor(const plugin::Color&);
269  }
270 }
271 
272 #endif
273 // __HDI_CORE_COLOR__
double b
Blue channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:40
static Color cyan()
Static accessor to get a pure cyan Color object.
static Color gray()
Static accessor to get a neutral gray Color object.
Describes an RGB color, with opacity, typically for UI purposes.
Definition: hdicoreColor.h:24
static Color red()
Static accessor to get a pure red Color object.
static Color purple()
Static accessor to get a pure purple Color object.
virtual ~Color()
Color destructor.
static Color white()
Static accessor to get a pure white Color object.
static Color yellow()
Static accessor to get a pure yellow Color object.
static Color blue()
Static accessor to get a pure blue Color object.
static Color magenta()
Static accessor to get a pure magenta Color object.
virtual void darken(const double percentage_)
Darkens the color by a percentage.
static Color green()
Static accessor to get a pure green Color object.
static Color orange()
Static accessor to get a pure orange Color object.
static Color darkGray()
Static accessor to get a dark gray Color object.
virtual bool operator==(const Color &rhs_) const
Tests whether a given Color object is the same as another.
Definition: hdicoreaiArray.h:12
virtual void lighten(const double percentage_)
Lightens the color by a percentage.
Color()
Default Color constructor; makes a black and fully opaque color.
virtual Color & operator=(const Color &rhs_)
Sets a Color object from another Color object.
static Color black()
Static accessor to get a pure black Color object.
virtual bool operator!=(const Color &rhs_) const
Tests whether a given Color object is not the same as another.
double g
Green channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:35
double opacity
Alpha channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:45
static Color lightGray()
Static accessor to get a light gray Color object.
double r
Red channel, in range [0.0, 1.0].
Definition: hdicoreColor.h:30