Magick::Color Class Reference

`#include <Color.h>`

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

## Public Types

enum | PixelType { CMYKPixel, CMYKAPixel, RGBPixel, RGBAPixel }

## Public Member Functions

| Color (void)
| Color (const Magick::Quantum red_, const Magick::Quantum green_, const Magick::Quantum blue_)
| Color (const Magick::Quantum red_, const Magick::Quantum green_, const Magick::Quantum blue_, const Magick::Quantum alpha_)
| Color (const Magick::Quantum cyan_, const Magick::Quantum magenta_, const Magick::Quantum yellow_, const Magick::Quantum black_, const Magick::Quantum alpha_)
| Color (const char *color_)
| Color (const Color &color_)
| Color (const PixelInfo &color_)
| Color (const std::string &color_)
virtual | ~Color (void)
Color & | operator= (const Color &color_)
const Color & | operator= (const char *color)
const Color & | operator= (const PixelInfo &color_)
const Color & | operator= (const std::string &color)
| operator PixelInfo () const
| operator std::string () const
bool | isFuzzyEquivalent (const Color &color_, const double fuzz_) const
void | isValid (const bool valid_)
bool | isValid (void) const
Magick::Color::PixelType | pixelType (void) const
void | quantumAlpha (const Quantum alpha_)
Quantum | quantumAlpha (void) const
void | quantumBlack (const Quantum black_)
Quantum | quantumBlack (void) const
void | quantumBlue (const Quantum blue_)
Quantum | quantumBlue (void) const
void | quantumGreen (const Quantum green_)
Quantum | quantumGreen (void) const
void | quantumRed (const Quantum red_)
Quantum | quantumRed (void) const

## Protected Member Functions

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

## Static Protected Member Functions

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

## Protected Attributes

PixelInfo * | _pixel

## Detailed Description

Definition at line 36 of file Color.h.

## Member Enumeration Documentation

## PixelType

enum Magick::Color::PixelType

Enumerator
CMYKPixel |
CMYKAPixel |
RGBPixel |
RGBAPixel |

Definition at line 61 of file Color.h.

## Constructor & Destructor Documentation

## Color() [1/10]

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

Definition at line 78 of file Color.cpp.

## Color() [2/10]

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

Definition at line 89 of file Color.cpp.

References quantumAlpha(), quantumBlack(), quantumBlue(), quantumGreen(), and quantumRed().

## Color() [3/10]

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

Definition at line 105 of file Color.cpp.

References quantumAlpha(), quantumBlack(), quantumBlue(), quantumGreen(), quantumRed(), and RGBAPixel.

## Color() [4/10]

Magick::Color::Color | ( | const Magick::Quantum | cyan_,
|  | const Magick::Quantum | magenta_,
|  | const Magick::Quantum | yellow_,
|  | const Magick::Quantum | black_,
|  | const Magick::Quantum | alpha_
| ) |  |

Definition at line 123 of file Color.cpp.

References CMYKAPixel, quantumAlpha(), quantumBlack(), quantumBlue(), quantumGreen(), and quantumRed().

## Color() [5/10]

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

Definition at line 142 of file Color.cpp.

## Color() [6/10]

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

Definition at line 154 of file Color.cpp.

References _pixel.

## Color() [7/10]

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

Definition at line 163 of file Color.cpp.

References _pixel.

## Color() [8/10]

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

Definition at line 172 of file Color.cpp.

## ~Color()

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

virtual

Definition at line 184 of file Color.cpp.

## Color() [9/10]

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

protected

Definition at line 381 of file Color.cpp.

## Color() [10/10]

Magick::Color::Color | ( | PixelType | pixelType_ | ) |

protected

Definition at line 372 of file Color.cpp.

## Member Function Documentation

## isFuzzyEquivalent()

bool Magick::Color::isFuzzyEquivalent | ( | const Color & | color_,
|  | const double | fuzz_
| ) |  | const

Definition at line 278 of file Color.cpp.

References _pixel.

## isValid() [1/2]

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

Definition at line 301 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().

## isValid() [2/2]

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

Definition at line 291 of file Color.cpp.

## operator PixelInfo()

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

## operator std::string()

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

Definition at line 253 of file Color.cpp.

## operator=() [1/4]

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

Definition at line 192 of file Color.cpp.

References _pixel.

## operator=() [2/4]

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

Definition at line 209 of file Color.cpp.

## operator=() [3/4]

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

## operator=() [4/4]

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

Definition at line 223 of file Color.cpp.

References GetPPException, and ThrowPPException.

## pixel()

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

protected

Definition at line 389 of file Color.cpp.

## pixelType()

Magick::Color::PixelType Magick::Color::pixelType | ( | void |  | ) | const

Definition at line 296 of file Color.cpp.

## quantumAlpha() [1/2]

void Magick::Color::quantumAlpha | ( | const Quantum | alpha_ | ) |

Definition at line 317 of file Color.cpp.

## quantumAlpha() [2/2]

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

Definition at line 323 of file Color.cpp.

Referenced by Color().

## quantumBlack() [1/2]

void Magick::Color::quantumBlack | ( | const Quantum | black_ | ) |

Definition at line 328 of file Color.cpp.

## quantumBlack() [2/2]

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

Definition at line 334 of file Color.cpp.

Referenced by Color().

## quantumBlue() [1/2]

void Magick::Color::quantumBlue | ( | const Quantum | blue_ | ) |

Definition at line 339 of file Color.cpp.

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

## quantumBlue() [2/2]

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

Definition at line 345 of file Color.cpp.

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

## quantumGreen() [1/2]

void Magick::Color::quantumGreen | ( | const Quantum | green_ | ) |

Definition at line 350 of file Color.cpp.

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

## quantumGreen() [2/2]

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

Definition at line 356 of file Color.cpp.

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

## quantumRed() [1/2]

void Magick::Color::quantumRed | ( | const Quantum | red_ | ) |

Definition at line 361 of file Color.cpp.

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

## quantumRed() [2/2]

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

Definition at line 367 of file Color.cpp.

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

## scaleDoubleToQuantum()

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

static protected

Definition at line 400 of file Color.cpp.

## scaleQuantumToDouble()

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

static protected

Definition at line 405 of file Color.cpp.

## Member Data Documentation

## _pixel

PixelInfo* Magick::Color::_pixel

protected

Definition at line 174 of file Color.h.

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

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

- Color.h
- Color.cpp