47 this->
requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
64 this->
requestModified(SP_OBJECT_MODIFIED_FLAG | SP_OBJECT_STYLE_MODIFIED_FLAG);
71 if (
parent && !(flags & SP_OBJECT_PARENT_MODIFIED_FLAG)) {
81 if ((flags & SP_OBJECT_WRITE_BUILD) && !
repr) {
102 if (is<SPStop>(obj)) {
103 result = cast<SPStop>(obj);
115 if (is<SPStop>(obj)) {
116 auto stop = cast<SPStop>(obj);
118 if (stop->getNextStop() ==
this) {
121 g_warning(
"SPStop previous/next relationship broken");
153 os <<
"stop-color:" << color.
toString(
false) <<
";stop-opacity:" << color.
getOpacity() <<
";";
bool SP_ATTRIBUTE_IS_CSS(SPAttr k)
True iff k is a property in SVG, i.e.
Lookup dictionary for attributes/properties.
A thin wrapper around std::ostringstream, but writing floating point numbers in the format required b...
std::string toString(bool opacity=true) const
Format the color as a css string and return it.
bool addOpacity(double opacity=1.0)
double getOpacity() const
Get the opacity in this color, if it's stored.
Interface for refcounted XML nodes.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
bool setAttributeCssDouble(Util::const_char_ptr key, double val)
Set a property attribute to val [slightly rounded], in the format required for CSS properties: in par...
Typed SVG document implementation.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Inkscape::XML::Node * repr
void requestModified(unsigned int flags)
Requests that a modification notification signal be emitted later (e.g.
virtual void set(SPAttr key, const char *value)
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
virtual Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags)
SPObject * getPrev()
Returns previous object in sibling list or NULL.
void readAttr(char const *key)
Read value of key attribute from XML node into object.
Inkscape::XML::Node * getRepr()
Returns the XML representation of tree.
virtual void build(SPDocument *doc, Inkscape::XML::Node *repr)
void requestDisplayUpdate(unsigned int flags)
Queues an deferred update of this object's display.
Glib::ustring path_string
void modified(guint flags) override
SPStop * getNextStop()
Virtual write: write object attributes to repr.
static void setColorRepr(Inkscape::XML::Node *node, Inkscape::Colors::Color const &color)
Set the color and opacity directly into the given xml repr.
void setColor(Inkscape::Colors::Color const &color)
Sets the stop color and stop opacity in the style attribute.
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Virtual set: set attribute to value.
void set(SPAttr key, const char *value) override
Virtual build: set stop attributes from its associated XML node.
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Inkscape::Colors::Color getColor() const
T< SPAttr::COLOR, SPIColor > color
color
T< SPAttr::STOP_COLOR, SPIColor > stop_color
gradient-stop
T< SPAttr::STOP_OPACITY, SPIScale24 > stop_opacity
TODO: insert short description here.
Inkscape::XML::Node * node
static cairo_user_data_key_t key
TODO: insert short description here.
TODO: insert short description here.
Interface for XML documents.
virtual Node * createElement(char const *name)=0
SPStyle - a style object for SPItem objects.
double sp_svg_read_percentage(char const *str, double def)