Magick::Color Class Reference

`#include <Color.h>`

Inheritance diagram for Magick::Color:
[legend]
Collaboration diagram for Magick::Color:
[legend]

## Public Member Functions

| Color (void)
| Color (Magick::Quantum red_, Magick::Quantum green_, Magick::Quantum blue_)
| Color (Magick::Quantum red_, Magick::Quantum green_, Magick::Quantum blue_, Magick::Quantum alpha_)
| Color (const char *x11color_)
| Color (const Color &color_)
| Color (const PixelPacket &color_)
| Color (const std::string &x11color_)
virtual | ~Color (void)
Color & | operator= (const Color &color_)
const Color & | operator= (const char *x11color)
const Color & | operator= (const std::string &x11color_)
const Color & | operator= (const PixelPacket &color_)
| operator PixelPacket () const
| operator std::string () const
void | alpha (double alpha_)
double | alpha (void) const
void | alphaQuantum (Quantum alpha_)
Quantum | alphaQuantum (void) const
void | blueQuantum (Quantum blue_)
Quantum | blueQuantum (void) const
void | greenQuantum (Quantum green_)
Quantum | greenQuantum (void) const
void | isValid (bool valid_)
bool | isValid (void) const
void | redQuantum (Quantum red_)
Quantum | redQuantum (void) const
double | intensity (void) const

## Static Public Member Functions

static Quantum | scaleDoubleToQuantum (const double double_)
static double | scaleQuantumToDouble (const Quantum quantum_)

## Protected Types

enum | PixelType { RGBPixel, RGBAPixel, CYMKPixel }

## Protected Member Functions

| Color (PixelPacket *rep_, PixelType pixelType_)
void | pixel (PixelPacket *rep_, PixelType pixelType_)

## Protected Attributes

PixelPacket * | _pixel

## Detailed Description

Definition at line 32 of file Color.h.

## Member Enumeration Documentation

enum Magick::Color::PixelType

protected

Enumerator
RGBPixel |
RGBAPixel |
CYMKPixel |

Definition at line 149 of file Color.h.

## Constructor & Destructor Documentation

Magick::Color::Color | ( | void |  | ) |

Definition at line 76 of file Color.cpp.

References _pixel.

Magick::Color::Color | ( | Magick::Quantum | red_,
|  | Magick::Quantum | green_,
|  | Magick::Quantum | blue_
| ) |  |

Definition at line 87 of file Color.cpp.

References alphaQuantum(), blueQuantum(), greenQuantum(), and redQuantum().

Magick::Color::Color | ( | Magick::Quantum | red_,
|  | Magick::Quantum | green_,
|  | Magick::Quantum | blue_,
|  | Magick::Quantum | alpha_
| ) |  |

Definition at line 100 of file Color.cpp.

References alphaQuantum(), blueQuantum(), greenQuantum(), and redQuantum().

Magick::Color::Color | ( | const char * | x11color_ | ) |

Definition at line 113 of file Color.cpp.

Magick::Color::Color | ( | const Color & | color_ | ) |

Definition at line 125 of file Color.cpp.

References _pixel.

Magick::Color::Color | ( | const PixelPacket & | color_ | ) |

Definition at line 134 of file Color.cpp.

References _pixel, and RGBAPixel.

Magick::Color::Color | ( | const std::string & | x11color_ | ) |

Definition at line 146 of file Color.cpp.

Magick::Color::~Color | ( | void |  | ) |

virtual

Definition at line 158 of file Color.cpp.

Magick::Color::Color | ( | PixelPacket * | rep_,
|  | PixelType | pixelType_
| ) |  |

protected

Definition at line 272 of file Color.cpp.

## Member Function Documentation

void Magick::Color::alpha | ( | double | alpha_ | ) |

inline

Definition at line 382 of file Color.h.

References alphaQuantum(), and scaleDoubleToQuantum().

double Magick::Color::alpha | ( | void |  | ) | const

inline

Definition at line 386 of file Color.h.

void Magick::Color::alphaQuantum | ( | Magick::Quantum | alpha_ | ) |

inline

Definition at line 391 of file Color.h.

Magick::Quantum Magick::Color::alphaQuantum | ( | void |  | ) | const

inline

Definition at line 397 of file Color.h.

Referenced by alpha(), Color(), Magick::ColorGray::ColorGray(), Magick::ColorHSL::ColorHSL(), Magick::ColorMono::ColorMono(), Magick::ColorRGB::ColorRGB(), and Magick::ColorYUV::ColorYUV().

void Magick::Color::blueQuantum | ( | Magick::Quantum | blue_ | ) |

inline

Definition at line 402 of file Color.h.

Referenced by Magick::operator<(), and Magick::operator==().

Magick::Quantum Magick::Color::blueQuantum | ( | void |  | ) | const

inline

Definition at line 408 of file Color.h.

Referenced by Color(), and Magick::ColorHSL::ColorHSL().

void Magick::Color::greenQuantum | ( | Magick::Quantum | green_ | ) |

inline

Definition at line 413 of file Color.h.

Referenced by Magick::operator<(), and Magick::operator==().

Magick::Quantum Magick::Color::greenQuantum | ( | void |  | ) | const

inline

Definition at line 419 of file Color.h.

Referenced by Color(), and Magick::ColorHSL::ColorHSL().

double Magick::Color::intensity | ( | void |  | ) | const

inline

Definition at line 108 of file Color.h.

void Magick::Color::isValid | ( | bool | valid_ | ) |

Definition at line 256 of file Color.cpp.

Referenced by Magick::Image::backgroundColor(), Magick::Image::borderColor(), Magick::Image::colorize(), Magick::Image::colorMap(), Magick::Image::matteColor(), Magick::Image::opaque(), Magick::operator==(), Magick::Image::transparent(), and Magick::Image::transparentChroma().

bool Magick::Color::isValid | ( | void |  | ) | const

Definition at line 251 of file Color.cpp.

Magick::Color::operator PixelPacket | ( |  | ) | const

Magick::Color::operator std::string | ( |  | ) | const

Definition at line 228 of file Color.cpp.

Magick::Color & Magick::Color::operator= | ( | const Color & | color_ | ) |

Definition at line 172 of file Color.cpp.

References _pixel.

const Magick::Color & Magick::Color::operator= | ( | const char * | x11color | ) |

Definition at line 166 of file Color.cpp.

const Magick::Color & Magick::Color::operator= | ( | const std::string & | x11color_ | ) |

Definition at line 202 of file Color.cpp.

References GetPPException, and ThrowPPException.

const Color& Magick::Color::operator= | ( | const PixelPacket & | color_ | ) |

void Magick::Color::pixel | ( | PixelPacket * | rep_,
|  | PixelType | pixelType_
| ) |  |

protected

Definition at line 280 of file Color.cpp.

void Magick::Color::redQuantum | ( | Magick::Quantum | red_ | ) |

inline

Definition at line 424 of file Color.h.

Referenced by Magick::operator<(), and Magick::operator==().

Magick::Quantum Magick::Color::redQuantum | ( | void |  | ) | const

inline

Definition at line 430 of file Color.h.

Referenced by Color(), and Magick::ColorHSL::ColorHSL().

static Quantum Magick::Color::scaleDoubleToQuantum | ( | const double | double_ | ) |

inlinestatic

Definition at line 114 of file Color.h.

Referenced by alpha().

static double Magick::Color::scaleQuantumToDouble | ( | const Quantum | quantum_ | ) |

inlinestatic

Definition at line 121 of file Color.h.

## Member Data Documentation

PixelPacket* Magick::Color::_pixel

protected

Definition at line 170 of file Color.h.

Referenced by Color(), and operator=().

The documentation for this class was generated from the following files:

- Color.h
- Color.cpp