Inkscape
Vector Graphics Editor
|
#include <components.h>
Public Member Functions | |
Component (Type type, unsigned int index, std::string id, std::string name, std::string tip, Unit unit=Unit::EightBit) | |
Component (std::string id, std::string name, std::string tip, Unit unit=Unit::EightBit) | |
double | normalize (double value) const |
Clamp the value to between 0.0 and 1.0, except for hue which is wrapped around. | |
Public Attributes | |
Type | type |
unsigned int | index |
std::string | id |
std::string | name |
std::string | tip |
unsigned | scale |
Unit | unit = Unit::EightBit |
Definition at line 50 of file components.h.
Inkscape::Colors::Space::Component::Component | ( | Type | type, |
unsigned int | index, | ||
std::string | id, | ||
std::string | name, | ||
std::string | tip, | ||
Unit | unit = Unit::EightBit |
||
) |
Definition at line 176 of file components.cpp.
References Inkscape::Colors::Space::Chroma40, Inkscape::Colors::Space::Degree, Inkscape::Colors::Space::EightBit, Inkscape::Colors::Space::Linear1024, Inkscape::Colors::Space::Percent, scale, and unit.
Inkscape::Colors::Space::Component::Component | ( | std::string | id, |
std::string | name, | ||
std::string | tip, | ||
Unit | unit = Unit::EightBit |
||
) |
Definition at line 205 of file components.cpp.
double Inkscape::Colors::Space::Component::normalize | ( | double | value | ) | const |
Clamp the value to between 0.0 and 1.0, except for hue which is wrapped around.
Definition at line 212 of file components.cpp.
References Inkscape::Colors::Space::Degree, and unit.
std::string Inkscape::Colors::Space::Component::id |
Definition at line 57 of file components.h.
Referenced by Inkscape::UI::Widget::ColorSlider::draw_func().
unsigned int Inkscape::Colors::Space::Component::index |
Definition at line 56 of file components.h.
Referenced by Inkscape::UI::Widget::ColorSlider::draw_func().
std::string Inkscape::Colors::Space::Component::name |
Definition at line 58 of file components.h.
unsigned Inkscape::Colors::Space::Component::scale |
Definition at line 60 of file components.h.
Referenced by Component(), Inkscape::UI::Widget::ColorSlider::getScaled(), and Inkscape::UI::Widget::ColorSlider::setScaled().
std::string Inkscape::Colors::Space::Component::tip |
Definition at line 59 of file components.h.
Type Inkscape::Colors::Space::Component::type |
Definition at line 55 of file components.h.
Referenced by Inkscape::Colors::Space::_build(), and Inkscape::Colors::ColorSet::isValid().
Unit Inkscape::Colors::Space::Component::unit = Unit::EightBit |
Definition at line 61 of file components.h.
Referenced by Component(), and normalize().