#include "ut_types.h"
#include <string>
Go to the source code of this file.
Classes | |
class | UT_ColorPatImpl |
class | UT_RGBColor |
class | UT_HashColor |
Defines | |
#define | UT_RGBCOLOR_PROXIMITY 45 |
Typedefs | |
typedef void | AbiNativeWidget |
Functions | |
void | UT_setColor (UT_RGBColor &col, unsigned char r, unsigned char g, unsigned char b, bool bTransparent=false) |
ABI_EXPORT void | UT_parseColor (const char *, UT_RGBColor &) |
ABI_EXPORT std::string | UT_colorToHex (const char *, bool bPrefix=false) |
#define UT_RGBCOLOR_PROXIMITY 45 |
Referenced by UT_RGBColor::operator%=().
typedef void AbiNativeWidget |
ABI_EXPORT std::string UT_colorToHex | ( | const char * | szColor, | |
bool | bPrefix | |||
) |
This function takes in a color string of any form (e.g. "red", "CMYK()", "#000000", "000000", etc.) and returns an RGB hexadecimal string.
szColor | The incoming string to parse | |
bPrefix | The return string will be prefixed with a '#' if bPrefix is true. Defaults to false. |
WARNING: Will return 000000 or #000000 if an invalid color is passed in
References UT_RGBColor::m_blu, UT_RGBColor::m_grn, UT_RGBColor::m_red, UT_HashColor::setColor(), UT_parseColor(), and UT_return_val_if_fail.
Referenced by IE_Exp_HTML_Listener::_makeStylesheet(), IE_Exp_HTML_Listener::_openSpan(), ODe_Style_Style::GraphicProps::fetchAttributesFromAbiProps(), ODe_Style_Style::CellProps::fetchAttributesFromAbiProps(), ODe_Style_Style::TableProps::fetchAttributesFromAbiProps(), ODe_Style_Style::TextProps::fetchAttributesFromAbiProps(), ODe_Style_Style::ParagraphProps::fetchAttributesFromAbiProps(), ODe_Style_PageLayout::fetchAttributesFromAbiSection(), IE_Exp_HTML_StyleTree::IE_Exp_HTML_StyleTree(), IE_Exp_OpenXML::setBackgroundColor(), IE_Exp_OpenXML::setTableBorder(), and IE_Exp_OpenXML::setTextColor().
ABI_EXPORT void UT_parseColor | ( | const char * | , | |
UT_RGBColor & | ||||
) |
References UT_RGBColor::m_bIsTransparent, UT_RGBColor::m_blu, UT_RGBColor::m_grn, UT_RGBColor::m_red, UT_HashColor::rgb(), UT_HashColor::setColor(), UT_HashColor::setHashIfValid(), UT_ASSERT, UT_DEBUGMSG, UT_NOT_IMPLEMENTED, UT_parseCMYKColor(), and UT_parseGrayColor().
Referenced by AP_UnixDialog_Background::_constructWindowContents(), fp_TabRun::_draw(), fp_FieldRun::_lookupProperties(), fp_TabRun::_lookupProperties(), fl_TableLayout::_lookupProperties(), AP_Win32Dialog_Options_General::_onCommand(), XAP_Win32Dialog_FontChooser::_onInitDialog(), s_KWord_1_Listener::_openSpan(), AP_Dialog_Styles::_populateAbiPreview(), FV_View::_prefsListener(), IE_Exp_RTF::_write_rtf_header(), XAP_Preview_FontPreview::draw(), AP_FormatTable_preview::draw(), AP_FormatFrame_preview::draw(), AP_Border_Shading_preview::draw(), fp_Run::drawDecors(), AP_UnixDialog_Options::event_ChooseTransparentColor(), FV_View::FV_View(), FV_View::getColorSelBackground(), PP_PropertyTypeColor::PP_PropertyTypeColor(), XAP_Win32Dialog_FontChooser::runModal(), XAP_UnixDialog_FontChooser::runModal(), XAP_CocoaDialog_FontChooser::runModal, AP_Win32Dialog_Background::runModal(), s_background_properties(), s_border_properties(), s_border_properties_cell(), UT_RGBColor::setColor(), AP_Dialog_Background::setColor(), UT_colorToHex(), UT_Xpm2Bmp(), and XAP_Preview_FontPreview::XAP_Preview_FontPreview().
void UT_setColor | ( | UT_RGBColor & | col, | |
unsigned char | r, | |||
unsigned char | g, | |||
unsigned char | b, | |||
bool | bTransparent = false | |||
) |