Inkscape
Vector Graphics Editor
|
Paint type internal to SPStyle. More...
#include <style-internal.h>
Public Member Functions | |
SPIPaint () | |
~SPIPaint () override=default | |
void | read (gchar const *str) override |
Set SPIPaint object from string. | |
const Glib::ustring | get_value () const override |
void | clear () override |
virtual void | reset (bool init) |
void | cascade (const SPIBase *const parent) override |
void | merge (const SPIBase *const parent) override |
SPIPaint & | operator= (const SPIPaint &rhs) |
bool | equals (const SPIBase &rhs) const override |
bool | isSameType (SPIPaint const &other) const |
bool | isNoneSet () const |
bool | isNone () const |
bool | isColor () const |
bool | isPaintserver () const |
bool | isContext () const |
void | setNone () |
void | setTag (SPObject *tag) |
SPObject * | getTag () |
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 | |
SPPaintOrigin | paintOrigin: 2 |
SPPaintOrigin | paintSource: 2 |
bool | noneSet: 1 |
std::shared_ptr< SPPaintServerReference > | href |
SPObject * | tag = nullptr |
![]() | |
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 |
Paint type internal to SPStyle.
Definition at line 724 of file style-internal.h.
SPIPaint::SPIPaint | ( | ) |
Definition at line 1604 of file style-internal.cpp.
References clear().
|
overridedefault |
bool SPIPaint::canHaveCMS | ( | ) | const |
Definition at line 1609 of file style-internal.cpp.
References SPStyle::document, and SPIBase::style.
Referenced by read().
|
overridevirtual |
Implements SPIBase.
Definition at line 1802 of file style-internal.cpp.
References _color, SPStyle::color, SPIBase::inherit, isNone(), noneSet, paintOrigin, parent, reset(), SPIBase::set, SP_CSS_PAINT_ORIGIN_CURRENT_COLOR, SP_CSS_PAINT_ORIGIN_NORMAL, sp_style_set_ipaint_to_uri(), and SPIBase::style.
Referenced by merge().
|
overridevirtual |
Reimplemented from SPIBase.
Definition at line 1779 of file style-internal.cpp.
References reset().
Referenced by SPIPaint().
|
overridevirtual |
Reimplemented from SPIBase.
Definition at line 1857 of file style-internal.cpp.
References _color, SPIBase::equals(), href, isColor(), and isPaintserver().
|
overridevirtual |
Implements SPIBase.
Definition at line 1732 of file style-internal.cpp.
References _color, href, SPIBase::inherit, noneSet, paintSource, SP_CSS_PAINT_ORIGIN_CONTEXT_FILL, SP_CSS_PAINT_ORIGIN_CONTEXT_STROKE, SP_CSS_PAINT_ORIGIN_CURRENT_COLOR, and SP_CSS_PAINT_ORIGIN_NORMAL.
Referenced by Inkscape::Extension::Internal::PdfBuilder::Document::get_paint().
Colors::DocumentCMS const & SPIPaint::getCMS | ( | ) | const |
Definition at line 1614 of file style-internal.cpp.
References SPStyle::document, SPDocument::getDocumentCMS(), and SPIBase::style.
Referenced by read().
Colors::Color const & SPIPaint::getColor | ( | ) | const |
Definition at line 1770 of file style-internal.cpp.
References _color, and default_color().
Referenced by default_color(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), objects_query_fillstroke(), Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key(), Inkscape::UI::Widget::FillNStroke::performUpdate(), Inkscape::NRStyleData::Paint::set(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_get_same_fill_or_stroke_color(), sp_gradient_vector_for_object(), Inkscape::ObjectSet::swapFillStroke(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
|
inline |
Definition at line 785 of file style-internal.h.
References tag.
Referenced by Inkscape::UI::Widget::FillNStroke::performUpdate().
|
inline |
Definition at line 765 of file style-internal.h.
References _color, and isPaintserver().
Referenced by default_color(), equals(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), Inkscape::UI::Widget::PaintSelector::getModeForStyle(), isSameType(), objects_query_fillstroke(), Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key(), Inkscape::UI::Widget::FillNStroke::performUpdate(), Inkscape::NRStyleData::Paint::set(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_get_same_fill_or_stroke_color(), sp_gradient_vector_for_object(), Inkscape::ObjectSet::swapFillStroke(), and Inkscape::UI::Widget::FillNStroke::updateFromPaint().
|
inline |
Definition at line 773 of file style-internal.h.
References paintOrigin, SP_CSS_PAINT_ORIGIN_CONTEXT_FILL, and SP_CSS_PAINT_ORIGIN_CONTEXT_STROKE.
|
inline |
Definition at line 761 of file style-internal.h.
References _color, isPaintserver(), paintOrigin, and SP_CSS_PAINT_ORIGIN_NORMAL.
Referenced by cascade(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), Inkscape::UI::Widget::PaintSelector::getModeForStyle(), Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key(), Inkscape::NRStyleData::Paint::set(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_get_same_fill_or_stroke_color(), and Inkscape::ObjectSet::swapFillStroke().
|
inline |
Definition at line 757 of file style-internal.h.
References noneSet.
Referenced by sp_get_same_fill_or_stroke_color(), and Inkscape::UI::Widget::StrokeStyle::updateLine().
|
inline |
Definition at line 769 of file style-internal.h.
References href.
Referenced by default_color(), equals(), find_references(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), Inkscape::UI::Widget::PaintSelector::getModeForStyle(), isColor(), isNone(), isSameType(), objects_query_fillstroke(), Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key(), Inkscape::UI::Widget::FillNStroke::performUpdate(), Inkscape::NRStyleData::Paint::set(), Inkscape::UI::Widget::StyleSwatch::setStyle(), sp_get_same_fill_or_stroke_color(), sp_gradient_vector_for_object(), sp_item_get_gradient(), and Inkscape::ObjectSet::swapFillStroke().
|
inline |
Definition at line 749 of file style-internal.h.
References isColor(), isPaintserver(), paintOrigin, and paintSource.
Referenced by objects_query_fillstroke().
|
overridevirtual |
Implements SPIBase.
Definition at line 1845 of file style-internal.cpp.
References cascade(), SPIBase::inherit, parent, and SPIBase::set.
Definition at line 737 of file style-internal.h.
References _color, href, noneSet, SPIBase::operator=(), paintOrigin, and paintSource.
|
overridevirtual |
Set SPIPaint object from string.
Implements SPIBase.
Definition at line 1628 of file style-internal.cpp.
References _color, canHaveCMS(), SPStyle::color, SPObject::document, extract_uri(), SPStyle::fill, SPStyle::fill_ps_changed_connection, getCMS(), href, SPIBase::inherit, noneSet, SPStyle::object, paintOrigin, paintSource, reset(), SPIBase::set, setColor(), SP_CSS_PAINT_ORIGIN_CONTEXT_FILL, SP_CSS_PAINT_ORIGIN_CONTEXT_STROKE, SP_CSS_PAINT_ORIGIN_CURRENT_COLOR, sp_style_fill_paint_server_ref_changed(), sp_style_set_ipaint_to_uri_string(), sp_style_stroke_paint_server_ref_changed(), streq(), strneq(), SPStyle::stroke_ps_changed_connection, and SPIBase::style.
|
virtual |
Definition at line 1785 of file style-internal.cpp.
References _color, SPIBase::clear(), FILL, href, init(), noneSet, paintOrigin, paintSource, SP_CSS_PAINT_ORIGIN_NORMAL, and tag.
void SPIPaint::setColor | ( | Colors::Color const & | other | ) |
Definition at line 1764 of file style-internal.cpp.
References _color, and SPIBase::set.
Referenced by objects_query_fillstroke(), and read().
|
inline |
Definition at line 779 of file style-internal.h.
|
inline |
Definition at line 784 of file style-internal.h.
References tag.
|
private |
Definition at line 800 of file style-internal.h.
Referenced by cascade(), equals(), get_value(), getColor(), isColor(), isNone(), operator=(), read(), reset(), setColor(), and setNone().
std::shared_ptr<SPPaintServerReference> SPIPaint::href |
Definition at line 797 of file style-internal.h.
Referenced by equals(), find_references(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), get_value(), isPaintserver(), operator=(), Inkscape::Extension::Internal::PdfBuilder::paint_to_cache_key(), read(), reset(), Inkscape::NRStyleData::Paint::set(), and sp_style_set_ipaint_to_uri().
bool SPIPaint::noneSet |
Definition at line 796 of file style-internal.h.
Referenced by cascade(), get_value(), isNoneSet(), operator=(), read(), reset(), and setNone().
SPPaintOrigin SPIPaint::paintOrigin |
Definition at line 794 of file style-internal.h.
Referenced by cascade(), Inkscape::Extension::Internal::PdfBuilder::Document::get_paint(), isContext(), isNone(), isSameType(), Inkscape::NRStyleData::NRStyleData(), objects_query_fillstroke(), operator=(), read(), reset(), and Inkscape::NRStyleData::Paint::set().
SPPaintOrigin SPIPaint::paintSource |
Definition at line 795 of file style-internal.h.
Referenced by get_value(), isSameType(), operator=(), read(), and reset().
SPObject* SPIPaint::tag = nullptr |
Definition at line 798 of file style-internal.h.