Ipelib
|
#include <ipeattributes.h>
Public Member Functions | |
Color () | |
Color (String str) | |
Color (int r, int g, int b) | |
void | save (Stream &stream) const |
void | saveRGB (Stream &stream) const |
bool | isGray () const |
bool | operator== (const Color &rhs) const |
bool | operator!= (const Color &rhs) const |
Public Attributes | |
Fixed | iRed |
Fixed | iGreen |
Fixed | iBlue |
Related Functions | |
(Note that these are not member functions.) | |
Stream & | operator<< (Stream &stream, const Color &attr) |
An absolute RGB color.
|
inline |
Default constructor.
|
explicit |
Construct a color from a string.
If only a single number is given, this is a gray value, otherwise red, green, and blue components must be given.
References ipe::Lex::eos(), iBlue, iGreen, and iRed.
|
explicit |
Construct a color.
Arguments red, green, blue range from 0 to 1000.
References ipe::Fixed::fromInternal(), iBlue, iGreen, and iRed.
void Color::save | ( | Stream & | stream | ) | const |
void Color::saveRGB | ( | Stream & | stream | ) | const |
Save to stream in long format.
The RGB components are saved separately even for gray colors.
References iBlue, iGreen, and iRed.
Referenced by ipe::PdfPainter::drawAttributes().
bool Color::isGray | ( | ) | const |
is it an absolute gray value?
References iBlue, iGreen, and iRed.
Referenced by ipe::Latex::createLatexSource(), ipe::PdfPainter::drawColor(), and save().
|
inline |
Fixed ipe::Color::iRed |
Referenced by ipe::Attribute::Attribute(), ipe::Attribute::color(), Color(), ipe::Latex::createLatexSource(), ipe::CairoPainter::doDrawPath(), ipe::CairoPainter::doDrawText(), ipe::PdfPainter::drawColor(), ipe::CanvasBase::drawGrid(), ipe::CanvasBase::drawPaper(), isGray(), operator==(), ipe::QIpe(), ipe::PdfViewBase::refreshSurface(), save(), and saveRGB().
Fixed ipe::Color::iGreen |
Referenced by ipe::Attribute::Attribute(), ipe::Attribute::color(), Color(), ipe::Latex::createLatexSource(), ipe::CairoPainter::doDrawPath(), ipe::CairoPainter::doDrawText(), ipe::CanvasBase::drawGrid(), ipe::CanvasBase::drawPaper(), isGray(), operator==(), ipe::QIpe(), ipe::PdfViewBase::refreshSurface(), save(), and saveRGB().
Fixed ipe::Color::iBlue |
Referenced by ipe::Attribute::Attribute(), ipe::Attribute::color(), Color(), ipe::Latex::createLatexSource(), ipe::CairoPainter::doDrawPath(), ipe::CairoPainter::doDrawText(), ipe::CanvasBase::drawGrid(), ipe::CanvasBase::drawPaper(), isGray(), operator==(), ipe::QIpe(), ipe::PdfViewBase::refreshSurface(), save(), and saveRGB().