summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0791f39)
raw | patch | inline | side by side (parent: 0791f39)
author | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 30 Sep 2006 16:29:24 +0000 (16:29 +0000) | ||
committer | johanengelen <johanengelen@users.sourceforge.net> | |
Sat, 30 Sep 2006 16:29:24 +0000 (16:29 +0000) |
src/path-chemistry.cpp | patch | blob | history | |
src/splivarot.cpp | patch | blob | history |
diff --git a/src/path-chemistry.cpp b/src/path-chemistry.cpp
index 0c35020b775e10141f2867be5b0503ca219535df..1415f85e6138ffba4ab87f7164783d2dbc39a45a 100644 (file)
--- a/src/path-chemistry.cpp
+++ b/src/path-chemistry.cpp
SP_OBJECT_STYLE(SP_OBJECT_PARENT(item)));
repr->setAttribute("style", style_str);
g_free(style_str);
+
+ /* Mask */
+ gchar *mask_str = (gchar *) SP_OBJECT_REPR(item)->attribute("mask");
+ if ( mask_str )
+ repr->setAttribute("mask", mask_str);
+
+ /* Clip path */
+ gchar *clip_path_str = (gchar *) SP_OBJECT_REPR(item)->attribute("clip-path");
+ if ( clip_path_str )
+ repr->setAttribute("clip-path", clip_path_str);
+
/* Rotation center */
sp_repr_set_attr(repr, "inkscape:transform-center-x", SP_OBJECT_REPR(item)->attribute("inkscape:transform-center-x"));
sp_repr_set_attr(repr, "inkscape:transform-center-y", SP_OBJECT_REPR(item)->attribute("inkscape:transform-center-y"));
diff --git a/src/splivarot.cpp b/src/splivarot.cpp
index 2fd01cb69c7cabb104f084b0d1eb33fb49f882c7..242cf3a24bf6e869040827f54f0725f7a1dbd75e 100644 (file)
--- a/src/splivarot.cpp
+++ b/src/splivarot.cpp
sp_item_write_transform(item, SP_OBJECT_REPR(item), NR::identity());
gchar *style = g_strdup(SP_OBJECT_REPR(item)->attribute("style"));
+ gchar *mask = g_strdup(SP_OBJECT_REPR(item)->attribute("mask"));
+ gchar *clip_path = g_strdup(SP_OBJECT_REPR(item)->attribute("clip-path"));
Path *orig = Path_for_item(item, false);
if (orig == NULL) {
Inkscape::XML::Node *repr = sp_repr_new("svg:path");
+ // restore style, mask and clip-path
repr->setAttribute("style", style);
+ g_free(style);
+
+ if ( mask ) {
+ repr->setAttribute("mask", mask);
+ g_free(mask);
+ }
+
+ if ( clip_path ) {
+ repr->setAttribute("clip-path", clip_path);
+ g_free(clip_path);
+ }
+ // path
gchar *str = orig->svg_dump_path();
repr->setAttribute("d", str);
g_free(str);