Magick++  7.0.7
Convert, Edit, Or Compose Bitmap Images
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)
 
Coloroperator= (const Color &color_)
 
const Coloroperator= (const char *color)
 
const Coloroperator= (const PixelInfo &color_)
 
const Coloroperator= (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 34 of file Color.h.

Member Enumeration Documentation

◆ PixelType

Enumerator
CMYKPixel 
CMYKAPixel 
RGBPixel 
RGBAPixel 

Definition at line 59 of file Color.h.

Constructor & Destructor Documentation

◆ Color() [1/10]

Magick::Color::Color ( void  )

Definition at line 69 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 78 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 94 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_ 
)

◆ Color() [5/10]

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

Definition at line 131 of file Color.cpp.

◆ Color() [6/10]

Magick::Color::Color ( const Color color_)

Definition at line 143 of file Color.cpp.

References _pixel.

◆ Color() [7/10]

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

Definition at line 152 of file Color.cpp.

References _pixel.

◆ Color() [8/10]

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

Definition at line 161 of file Color.cpp.

◆ ~Color()

Magick::Color::~Color ( void  )
virtual

Definition at line 173 of file Color.cpp.

References _pixel.

◆ Color() [9/10]

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

Definition at line 388 of file Color.cpp.

◆ Color() [10/10]

Magick::Color::Color ( PixelType  pixelType_)
protected

Definition at line 379 of file Color.cpp.

Member Function Documentation

◆ isFuzzyEquivalent()

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

Definition at line 269 of file Color.cpp.

References _pixel.

◆ isValid() [1/2]

◆ isValid() [2/2]

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

Definition at line 282 of file Color.cpp.

Referenced by isValid(), and operator std::string().

◆ operator PixelInfo()

Magick::Color::operator PixelInfo ( ) const

◆ operator std::string()

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

Definition at line 242 of file Color.cpp.

References _pixel, CMYKAPixel, isValid(), pixel(), RGBAPixel, and RGBPixel.

◆ operator=() [1/4]

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

Definition at line 181 of file Color.cpp.

References _pixel.

Referenced by operator=().

◆ operator=() [2/4]

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

Definition at line 198 of file Color.cpp.

References _pixel, and operator=().

◆ operator=() [3/4]

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

◆ operator=() [4/4]

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

◆ pixel()

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

Definition at line 396 of file Color.cpp.

References _pixel.

Referenced by operator std::string().

◆ pixelType()

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

Definition at line 287 of file Color.cpp.

◆ quantumAlpha() [1/2]

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

Definition at line 308 of file Color.cpp.

References _pixel, CMYKAPixel, CMYKPixel, RGBAPixel, and RGBPixel.

◆ quantumAlpha() [2/2]

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

Definition at line 330 of file Color.cpp.

References _pixel.

Referenced by Magick::ColorCMYK::alpha(), Magick::ColorRGB::alpha(), Color(), and operator=().

◆ quantumBlack() [1/2]

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

Definition at line 335 of file Color.cpp.

References _pixel.

◆ quantumBlack() [2/2]

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

Definition at line 341 of file Color.cpp.

References _pixel.

Referenced by Magick::ColorCMYK::black(), Color(), and operator=().

◆ quantumBlue() [1/2]

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

Definition at line 346 of file Color.cpp.

References _pixel.

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

◆ quantumBlue() [2/2]

◆ quantumGreen() [1/2]

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

Definition at line 357 of file Color.cpp.

References _pixel.

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

◆ quantumGreen() [2/2]

◆ quantumRed() [1/2]

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

Definition at line 368 of file Color.cpp.

References _pixel.

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

◆ quantumRed() [2/2]

◆ scaleDoubleToQuantum()

◆ scaleQuantumToDouble()

Member Data Documentation

◆ _pixel


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