Inkscape
Vector Graphics Editor
|
#include <style-internal.h>
Public Member Functions | |
SPIColor (bool inherits=true) | |
~SPIColor () override=default | |
void | read (gchar const *str) override |
void | read (gchar const *str, SPStyle &style) |
const Glib::ustring | get_value () const override |
void | clear () override |
void | cascade (const SPIBase *const parent) override |
void | merge (const SPIBase *const parent) override |
SPIColor & | operator= (const SPIColor &rhs) |
SPIColor & | operator= (const Colors::Color &rhs) |
bool | equals (const SPIBase &rhs) const override |
void | setColor (Colors::Color const &other) |
Colors::Color const & | getColor () const |
bool | canHaveCMS () const |
Colors::DocumentCMS const & | getCMS () const |
![]() | |
SPIBase (bool inherits_=true) | |
virtual | ~SPIBase ()=default |
void | readIfUnset (gchar const *str, SPStyleSrc source=SPStyleSrc::STYLE_PROP) |
void | readAttribute (Inkscape::XML::Node *repr) |
bool | shall_write (guint const flags=SP_STYLE_FLAG_IFSET, SPStyleSrc const &style_src_req=SPStyleSrc::STYLE_PROP, SPIBase const *const base=nullptr) const |
Check if this property should be written. | |
virtual const Glib::ustring | write (guint const flags=SP_STYLE_FLAG_IFSET, SPStyleSrc const &style_src_req=SPStyleSrc::STYLE_PROP, SPIBase const *const base=nullptr) const |
Compile this style conditionally into a 'name: value' string suitable for css attrs. | |
void | overwrite (const SPIBase *const other) |
void | setStylePointer (SPStyle *style_in) |
SPIBase & | operator= (const SPIBase &rhs)=default |
bool | operator== (const SPIBase &rhs) const |
virtual SPAttr | id () const |
Glib::ustring const & | name () const |
Public Attributes | |
bool | currentcolor = false |
![]() | |
bool | inherits: 1 |
bool | set: 1 |
bool | inherit: 1 |
bool | important: 1 |
SPStyleSrc | style_src |
Private Attributes | |
std::optional< Colors::Color > | _color |
Additional Inherited Members | |
![]() | |
char const * | important_str () const |
![]() | |
SPStyle * | style |
Definition at line 674 of file style-internal.h.
SPIColor::SPIColor | ( | bool | inherits = true | ) |
Definition at line 1453 of file style-internal.cpp.
|
overridedefault |
bool SPIColor::canHaveCMS | ( | ) | const |
Definition at line 1457 of file style-internal.cpp.
References SPStyle::document, and SPIBase::style.
Referenced by read().
|
overridevirtual |
Implements SPIBase.
Definition at line 1545 of file style-internal.cpp.
References _color, currentcolor, SPIBase::inherit, SPIBase::inherits, parent, and SPIBase::set.
|
inlineoverridevirtual |
Reimplemented from SPIBase.
Definition at line 685 of file style-internal.h.
References _color, and SPIBase::clear().
|
overridevirtual |
Reimplemented from SPIBase.
Definition at line 1575 of file style-internal.cpp.
References _color, currentcolor, and SPIBase::equals().
|
overridevirtual |
Implements SPIBase.
Definition at line 1536 of file style-internal.cpp.
References _color, currentcolor, and SPIBase::inherit.
Colors::DocumentCMS const & SPIColor::getCMS | ( | ) | const |
Definition at line 1462 of file style-internal.cpp.
References SPStyle::document, SPDocument::getDocumentCMS(), and SPIBase::style.
Referenced by read().
Colors::Color const & SPIColor::getColor | ( | ) | const |
Definition at line 1492 of file style-internal.cpp.
References _color, and default_color().
|
overridevirtual |
Implements SPIBase.
Definition at line 1561 of file style-internal.cpp.
References _color, currentcolor, SPIBase::inherit, SPIBase::inherits, parent, and SPIBase::set.
SPIColor & SPIColor::operator= | ( | const Colors::Color & | rhs | ) |
Definition at line 1478 of file style-internal.cpp.
References setColor().
Definition at line 1470 of file style-internal.cpp.
References _color, currentcolor, and SPIBase::operator=().
|
overridevirtual |
Implements SPIBase.
Definition at line 1501 of file style-internal.cpp.
References _color, canHaveCMS(), COLOR, SPStyle::color, currentcolor, getCMS(), SPIBase::inherit, SPIBase::set, and SPIBase::style.
void SPIColor::read | ( | gchar const * | str, |
SPStyle & | style | ||
) |
void SPIColor::setColor | ( | Colors::Color const & | other | ) |
Definition at line 1485 of file style-internal.cpp.
References _color, currentcolor, and SPIBase::set.
Referenced by operator=().
|
private |
Definition at line 706 of file style-internal.h.
Referenced by cascade(), clear(), equals(), get_value(), getColor(), merge(), operator=(), read(), and setColor().
bool SPIColor::currentcolor = false |
Definition at line 704 of file style-internal.h.
Referenced by cascade(), equals(), get_value(), merge(), operator=(), read(), and setColor().