Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
SPIPaint Class Reference

Paint type internal to SPStyle. More...

#include <style-internal.h>

Inheritance diagram for SPIPaint:
SPIBase TypedSPI< SPAttr::TEXT_DECORATION_FILL, SPIPaint > TypedSPI< SPAttr::TEXT_DECORATION_STROKE, SPIPaint > TypedSPI< SPAttr::FILL, SPIPaint > TypedSPI< SPAttr::STROKE, SPIPaint >

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
 
SPIPaintoperator= (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)
 
SPObjectgetTag ()
 
void setColor (Colors::Color const &other)
 
Colors::Color const & getColor () const
 
bool canHaveCMS () const
 
Colors::DocumentCMS const & getCMS () const
 
- Public Member Functions inherited from SPIBase
 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)
 
SPIBaseoperator= (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< SPPaintServerReferencehref
 
SPObjecttag = nullptr
 
- Public Attributes inherited from SPIBase
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

- Protected Member Functions inherited from SPIBase
char const * important_str () const
 
- Protected Attributes inherited from SPIBase
SPStylestyle
 

Detailed Description

Paint type internal to SPStyle.

Definition at line 724 of file style-internal.h.

Constructor & Destructor Documentation

◆ SPIPaint()

SPIPaint::SPIPaint ( )

Definition at line 1604 of file style-internal.cpp.

References clear().

◆ ~SPIPaint()

SPIPaint::~SPIPaint ( )
overridedefault

Member Function Documentation

◆ canHaveCMS()

bool SPIPaint::canHaveCMS ( ) const

Definition at line 1609 of file style-internal.cpp.

References SPStyle::document, and SPIBase::style.

Referenced by read().

◆ cascade()

void SPIPaint::cascade ( const SPIBase *const  parent)
overridevirtual

◆ clear()

void SPIPaint::clear ( )
overridevirtual

Reimplemented from SPIBase.

Definition at line 1779 of file style-internal.cpp.

References reset().

Referenced by SPIPaint().

◆ equals()

bool SPIPaint::equals ( const SPIBase rhs) const
overridevirtual

Reimplemented from SPIBase.

Definition at line 1857 of file style-internal.cpp.

References _color, SPIBase::equals(), href, isColor(), and isPaintserver().

◆ get_value()

◆ getCMS()

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().

◆ getColor()

◆ getTag()

SPObject * SPIPaint::getTag ( )
inline

Definition at line 785 of file style-internal.h.

References tag.

Referenced by Inkscape::UI::Widget::FillNStroke::performUpdate().

◆ isColor()

◆ isContext()

bool SPIPaint::isContext ( ) const
inline

◆ isNone()

◆ isNoneSet()

bool SPIPaint::isNoneSet ( ) const
inline

◆ isPaintserver()

◆ isSameType()

bool SPIPaint::isSameType ( SPIPaint const &  other) const
inline

Definition at line 749 of file style-internal.h.

References isColor(), isPaintserver(), paintOrigin, and paintSource.

Referenced by objects_query_fillstroke().

◆ merge()

void SPIPaint::merge ( const SPIBase *const  parent)
overridevirtual

Implements SPIBase.

Definition at line 1845 of file style-internal.cpp.

References cascade(), SPIBase::inherit, parent, and SPIBase::set.

◆ operator=()

SPIPaint & SPIPaint::operator= ( const SPIPaint rhs)
inline

Definition at line 737 of file style-internal.h.

References _color, href, noneSet, SPIBase::operator=(), paintOrigin, and paintSource.

◆ read()

◆ reset()

void SPIPaint::reset ( bool  init)
virtual

◆ setColor()

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().

◆ setNone()

void SPIPaint::setNone ( )
inline

Definition at line 779 of file style-internal.h.

References _color, and noneSet.

◆ setTag()

void SPIPaint::setTag ( SPObject tag)
inline

Definition at line 784 of file style-internal.h.

References tag.

Member Data Documentation

◆ _color

std::optional<Colors::Color> SPIPaint::_color
private

◆ href

◆ noneSet

bool SPIPaint::noneSet

Definition at line 796 of file style-internal.h.

Referenced by cascade(), get_value(), isNoneSet(), operator=(), read(), reset(), and setNone().

◆ paintOrigin

◆ paintSource

SPPaintOrigin SPIPaint::paintSource

Definition at line 795 of file style-internal.h.

Referenced by get_value(), isSameType(), operator=(), read(), and reset().

◆ tag

SPObject* SPIPaint::tag = nullptr

Definition at line 798 of file style-internal.h.

Referenced by getTag(), reset(), and setTag().


The documentation for this class was generated from the following files: