Inkscape
Vector Graphics Editor
|
Go to the source code of this file.
Namespaces | |
namespace | Inkscape |
Helper class to stream background task notifications as a series of messages. | |
namespace | Inkscape::Colors |
A set of useful color modifying functions which do not fit as generic methods on the color class itself but which are used in various places. | |
Functions | |
constexpr double | SP_COLOR_U_TO_F (uint32_t v) |
constexpr uint32_t | SP_COLOR_F_TO_U (double v) |
constexpr uint32_t | SP_RGBA32_R_U (uint32_t v) |
constexpr uint32_t | SP_RGBA32_G_U (uint32_t v) |
constexpr uint32_t | SP_RGBA32_B_U (uint32_t v) |
constexpr uint32_t | SP_RGBA32_A_U (uint32_t v) |
constexpr double | SP_RGBA32_R_F (uint32_t v) |
constexpr double | SP_RGBA32_G_F (uint32_t v) |
constexpr double | SP_RGBA32_B_F (uint32_t v) |
constexpr double | SP_RGBA32_A_F (uint32_t v) |
constexpr uint32_t | SP_RGBA32_U_COMPOSE (uint32_t r, uint32_t g, uint32_t b, uint32_t a) |
constexpr uint32_t | SP_RGBA32_F_COMPOSE (double r, double g, double b, double a) |
constexpr uint32_t | SP_RGBA32_C_COMPOSE (uint32_t c, double o) |
constexpr uint32_t | compose_argb32 (double a, double r, double g, double b) |
uint32_t | Inkscape::Colors::hex_to_rgba (std::string const &value) |
Parse a color directly without any CSS or CMS support. | |
std::vector< double > | Inkscape::Colors::rgba_to_values (uint32_t rgba, bool opacity) |
Convert a 32bit unsigned int into a set of 3 or 4 double values for rgba. | |
std::string | Inkscape::Colors::rgba_to_hex (uint32_t value, bool alpha) |
Output the RGBA value as a #RRGGBB hex color, if alpha is true then the output will be #RRGGBBAA instead. | |
std::string | Inkscape::Colors::color_to_id (std::optional< Color > const &color) |
Create a somewhat unique id for the given color used for palette identification. | |
std::string | Inkscape::Colors::desc_to_id (std::string const &desc) |
Transform a color name or description into an id used for palette identification. | |
Color | Inkscape::Colors::make_contrasted_color (Color const &orig, double amount) |
Make a darker or lighter version of the color, useful for making checkerboards. | |
Color | Inkscape::Colors::make_theme_color (Color const &orig, bool dark) |
Make a themed dark or light color based on a previous shade, returns RGB color. | |
double | Inkscape::Colors::lightness (Color color) |
double | Inkscape::Colors::perceptual_lightness (double l) |
double | Inkscape::Colors::get_perceptual_lightness (Color const &color) |
Return a value for how the light the color appears to be using HSLUV. | |
std::pair< double, double > | Inkscape::Colors::get_contrasting_color (double l) |
|
constexpr |
Definition at line 73 of file utils.h.
References SP_COLOR_F_TO_U(), and SP_RGBA32_U_COMPOSE().
|
constexpr |
Definition at line 23 of file utils.h.
Referenced by compose_argb32(), Inkscape::UI::Dialog::Print::draw_page(), Inkscape::Colors::Space::render_hue_scale(), Inkscape::Colors::Space::render_lightness_scale(), Inkscape::Colors::Space::render_saturation_scale(), SP_RGBA32_C_COMPOSE(), SP_RGBA32_F_COMPOSE(), and Inkscape::Extension::Internal::svgConvertRGBToText().
|
constexpr |
Definition at line 19 of file utils.h.
Referenced by SP_RGBA32_A_F(), SP_RGBA32_B_F(), SP_RGBA32_G_F(), and SP_RGBA32_R_F().
|
constexpr |
Definition at line 55 of file utils.h.
References SP_COLOR_U_TO_F(), and SP_RGBA32_A_U().
Referenced by Inkscape::CanvasItemGridXY::_render(), Inkscape::CanvasItemGridTiles::_render(), Inkscape::CanvasItemGuideLine::_render(), Inkscape::CanvasItemRect::_render(), Inkscape::UI::Widget::PageSizePreview::draw_func(), Inkscape::drawline(), Inkscape::UI::Tools::fit_item(), ink_cairo_pattern_add_color_stop(), ink_cairo_pattern_create(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), Inkscape::Colors::HexParser::parse(), Inkscape::Filters::FilterFlood::render_cairo(), Inkscape::UI::Preview::render_preview(), Inkscape::Colors::rgba_to_values(), Inkscape::UI::Widget::set_source_rgba(), and Inkscape::vline().
|
constexpr |
Definition at line 39 of file utils.h.
Referenced by Inkscape::CanvasItemBpath::_render(), Inkscape::CanvasItemRect::_render(), Inkscape::Colors::getMIMEData(), Inkscape::UI::Widget::rgba_to_array(), and SP_RGBA32_A_F().
|
constexpr |
Definition at line 51 of file utils.h.
References SP_COLOR_U_TO_F(), and SP_RGBA32_B_U().
Referenced by Inkscape::CanvasItemGridXY::_render(), Inkscape::CanvasItemGridTiles::_render(), Inkscape::CanvasItemGuideLine::_render(), Inkscape::drawline(), ink_cairo_draw_drop_shadow(), ink_cairo_pattern_add_color_stop(), ink_cairo_pattern_create(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), Inkscape::Colors::Space::NamedColor::NameParser::parse(), Inkscape::Colors::HexParser::parse(), Inkscape::Filters::FilterDiffuseLighting::render_cairo(), Inkscape::Filters::FilterFlood::render_cairo(), Inkscape::Filters::FilterSpecularLighting::render_cairo(), Inkscape::UI::Preview::render_preview(), Inkscape::Colors::rgba_to_values(), Inkscape::UI::Widget::set_source_rgba(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), and Inkscape::vline().
|
constexpr |
Definition at line 35 of file utils.h.
Referenced by Inkscape::Colors::getMIMEData(), Inkscape::Filters::DistantLight::light_components(), Inkscape::Filters::PointLight::light_components(), Inkscape::Filters::SpotLight::light_components(), Inkscape::UI::Widget::rgb_to_array(), Inkscape::UI::Widget::rgba_to_array(), SP_RGBA32_B_F(), and SP_RGBA32_C_COMPOSE().
|
constexpr |
Definition at line 68 of file utils.h.
References c, SP_COLOR_F_TO_U(), SP_RGBA32_B_U(), SP_RGBA32_G_U(), SP_RGBA32_R_U(), and SP_RGBA32_U_COMPOSE().
|
constexpr |
Definition at line 64 of file utils.h.
References SP_COLOR_F_TO_U(), and SP_RGBA32_U_COMPOSE().
Referenced by Inkscape::Colors::Space::RGB::_to_rgba(), SPMeshNodeArray::bicubic(), get_color_value(), ink_cairo_pattern_get_argb32(), Inkscape::Extension::Internal::Emf::myEnhMetaFileProc(), Inkscape::Filters::FilterDiffuseLighting::render_cairo(), Inkscape::Filters::FilterSpecularLighting::render_cairo(), and Inkscape::Colors::Space::CMS::toRGBA().
|
constexpr |
Definition at line 47 of file utils.h.
References SP_COLOR_U_TO_F(), and SP_RGBA32_G_U().
Referenced by Inkscape::CanvasItemGridXY::_render(), Inkscape::CanvasItemGridTiles::_render(), Inkscape::CanvasItemGuideLine::_render(), Inkscape::drawline(), ink_cairo_draw_drop_shadow(), ink_cairo_pattern_add_color_stop(), ink_cairo_pattern_create(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), Inkscape::Colors::Space::NamedColor::NameParser::parse(), Inkscape::Colors::HexParser::parse(), Inkscape::Filters::FilterDiffuseLighting::render_cairo(), Inkscape::Filters::FilterFlood::render_cairo(), Inkscape::Filters::FilterSpecularLighting::render_cairo(), Inkscape::UI::Preview::render_preview(), Inkscape::Colors::rgba_to_values(), Inkscape::UI::Widget::set_source_rgba(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), and Inkscape::vline().
|
constexpr |
Definition at line 31 of file utils.h.
Referenced by Inkscape::Colors::getMIMEData(), Inkscape::Filters::DistantLight::light_components(), Inkscape::Filters::PointLight::light_components(), Inkscape::Filters::SpotLight::light_components(), Inkscape::UI::Widget::rgb_to_array(), Inkscape::UI::Widget::rgba_to_array(), SP_RGBA32_C_COMPOSE(), and SP_RGBA32_G_F().
|
constexpr |
Definition at line 43 of file utils.h.
References SP_COLOR_U_TO_F(), and SP_RGBA32_R_U().
Referenced by Inkscape::CanvasItemGridXY::_render(), Inkscape::CanvasItemGridTiles::_render(), Inkscape::CanvasItemGuideLine::_render(), Inkscape::drawline(), ink_cairo_draw_drop_shadow(), ink_cairo_pattern_add_color_stop(), ink_cairo_pattern_create(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), ink_cairo_set_source_rgba32(), Inkscape::Colors::Space::NamedColor::NameParser::parse(), Inkscape::Colors::HexParser::parse(), Inkscape::Filters::FilterDiffuseLighting::render_cairo(), Inkscape::Filters::FilterFlood::render_cairo(), Inkscape::Filters::FilterSpecularLighting::render_cairo(), Inkscape::UI::Preview::render_preview(), Inkscape::Colors::rgba_to_values(), Inkscape::UI::Widget::set_source_rgba(), Inkscape::Extension::Internal::LaTeXTextRenderer::sp_flowtext_render(), and Inkscape::vline().
|
constexpr |
Definition at line 27 of file utils.h.
Referenced by Inkscape::Colors::getMIMEData(), Inkscape::Filters::DistantLight::light_components(), Inkscape::Filters::PointLight::light_components(), Inkscape::Filters::SpotLight::light_components(), Inkscape::UI::Widget::rgb_to_array(), Inkscape::UI::Widget::rgba_to_array(), SP_RGBA32_C_COMPOSE(), and SP_RGBA32_R_F().
|
constexpr |
Definition at line 60 of file utils.h.
Referenced by compose_argb32(), Inkscape::Colors::fromMIMEData(), SP_RGBA32_C_COMPOSE(), SP_RGBA32_F_COMPOSE(), Inkscape::Trace::Depixelize::DepixelizeTracingEngine::trace(), U_RGB_COMPOSE(), and U_RGBA_COMPOSE().