37 gchar *effectTarget =
nullptr;
38 gchar *pathTarget =
nullptr;
40 effectTarget = g_strdup_printf(
"#%s,0,1", source->
getId());
52 pathTarget = g_strdup_printf(
"#%s", effectObj->
getId());
54 pathRepr->
setAttribute(
"inkscape:path-effect", pathTarget);
73 char const *linked_fill_id = source->
getAttribute(
"inkscape:linked-fill");
74 if (!linked_fill_id) {
83 auto color = source->
style->
fill.getColor();
97 auto color = source->
style->
fill.getColor();
109 str += server->
getId();
122 str += server->
getId();
135 str += server->
getId();
199 if (linked !=
nullptr) {
216 double const ex(local.
descrim());
3x3 matrix representing an affine transformation.
Coord descrim() const
Calculate the descriminant.
A thin wrapper around std::ostringstream, but writing floating point numbers in the format required b...
Interface for refcounted XML nodes.
void setAttribute(Util::const_char_ptr key, Util::const_char_ptr value)
Change an attribute of this node.
Typed SVG document implementation.
SPObject * getObjectById(std::string const &id) const
SPDefs * getDefs()
Return the main defs object for the document.
Inkscape::XML::Document * getReprDoc()
Our Inkscape::XML::Document.
SPObject * getObjectByRepr(Inkscape::XML::Node *repr) const
Geom::Affine i2doc_affine() const
Returns the accumulated transformation of the item and all its ancestors, including root's viewport.
SPObject is an abstract base class of all of the document nodes at the SVG document level.
void appendChild(Inkscape::XML::Node *child)
void setAttribute(Inkscape::Util::const_char_ptr key, Inkscape::Util::const_char_ptr value)
char const * getId() const
Returns the objects current ID string.
SPStyle * style
Represents the style properties, whether from presentation attributes, the style attribute,...
SPObject * getPrev()
Returns previous object in sibling list or NULL.
void deleteObject(bool propagate, bool propagate_descendants)
Deletes an object, unparenting it from its parent.
Inkscape::XML::Node * getRepr()
Returns the XML representation of tree.
char const * getAttribute(char const *name) const
void addChild(Inkscape::XML::Node *child, Inkscape::XML::Node *prev=nullptr)
Base class for shapes, including <path> element.
SPPaintServer * getFillPaintServer()
T< SPAttr::FILL, SPIPaint > fill
fill
T< SPAttr::STROKE, SPIPaint > stroke
stroke
SPPaintServer * getStrokePaintServer()
T< SPAttr::FILL_OPACITY, SPIScale24 > fill_opacity
fill-opacity
T< SPAttr::STROKE_OPACITY, SPIScale24 > stroke_opacity
stroke-opacity
TODO: insert short description here.
std::shared_ptr< Css const > css
void sp_desktop_apply_css_recursive(SPObject *o, SPCSSAttr *css, bool skip_lines)
Apply style on object and children, recursively.
static void convert_stroke_server(SPCSSAttr *css, SPObject *source)
static SPObject * get_linked_fill(SPObject *source)
static void revert_stroke_color(SPCSSAttr *css, SPObject *source)
static SPObject * generate_linked_fill(SPShape *source)
static void convert_fill_color(SPCSSAttr *css, SPObject *source)
static void convert_fill_server(SPCSSAttr *css, SPObject *source)
static bool has_fill(SPObject *source)
static void revert_stroke_server(SPCSSAttr *css, SPObject *source)
static bool has_stroke(SPObject *source)
static void convert_stroke_color(SPCSSAttr *css, SPObject *source)
Fill/stroke conversion routines for LPEs which draw a stroke.
static R & release(R &r)
Decrements the reference count of a anchored object.
void lpe_shape_convert_stroke_and_fill(SPShape *shape)
Prepares a SPShape's fill and stroke for use in a path effect by setting the existing stroke properti...
void lpe_shape_revert_stroke_and_fill(SPShape *shape, double width)
Applies the fill of the SPShape to its stroke, sets the stroke width to the provided parameter,...
SPCSSAttr * sp_repr_css_attr_new()
Creates an empty SPCSSAttr (a class for manipulating CSS style properties).
void sp_repr_css_attr_unref(SPCSSAttr *css)
Unreferences an SPCSSAttr (will be garbage collected if no references remain).
void sp_repr_css_set_property_string(SPCSSAttr *css, char const *name, std::string const &value)
Set a style property to a standard string.
void sp_repr_css_set_property(SPCSSAttr *css, gchar const *name, gchar const *value)
Set a style property to a new value (e.g.
virtual Node * createElement(char const *name)=0
SPCSSAttr * sp_css_attr_scale(SPCSSAttr *css, double ex)
Scale any properties that may hold <length> by ex.
SPStyle - a style object for SPItem objects.