summaryrefslogtreecommitdiffstats
path: root/src/style.cpp
diff options
context:
space:
mode:
authorbulia byak <buliabyak@gmail.com>2006-10-08 06:37:09 +0000
committerbuliabyak <buliabyak@users.sourceforge.net>2006-10-08 06:37:09 +0000
commit46e63264879630c08bbec26c31cd8f66f10cf836 (patch)
treebd2a0698e709b4787afd2535944cbbce1cd3ce1f /src/style.cpp
parentComment out cairo-ft for font rendering. We should not need to depend on fre... (diff)
downloadinkscape-46e63264879630c08bbec26c31cd8f66f10cf836.tar.gz
inkscape-46e63264879630c08bbec26c31cd8f66f10cf836.zip
fix for filter (non)inheritance and a crude workaround for filter merging
(bzr r1779)
Diffstat (limited to 'src/style.cpp')
-rw-r--r--src/style.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/src/style.cpp b/src/style.cpp
index 048801ae4..05bb76bac 100644
--- a/src/style.cpp
+++ b/src/style.cpp
@@ -1458,7 +1458,7 @@ sp_style_merge_from_parent(SPStyle *const style, SPStyle const *const parent)
}
/* Filter effects */
- if(style->filter.set && style->filter.inherit) {
+ if (style->filter.inherit) {
sp_style_merge_ifilter(style, &style->filter, &parent->filter);
}
@@ -1930,6 +1930,17 @@ sp_style_merge_from_dying_parent(SPStyle *const style, SPStyle const *const pare
style->enable_background.value = parent->enable_background.value;
}
+ if (!style->filter.set || style->filter.inherit)
+ {
+ // FIXME: (1) this is a temp hack, as it must correctly handle ->filter_hreffed; (2)
+ // instead of just copying over, we need to _merge_ the two filters by combining their
+ // filter primitives
+ style->filter.set = parent->filter.set;
+ style->filter.inherit = parent->filter.inherit;
+ style->filter.filter = parent->filter.filter;
+ style->filter.uri = parent->filter.uri;
+ }
+
/** \todo
* fixme: Check that we correctly handle all properties that don't
* inherit by default (as shown in
@@ -1987,8 +1998,6 @@ sp_style_merge_from_dying_parent(SPStyle *const style, SPStyle const *const pare
* represent it as a normal SPILength; though will need to do something about existing
* users of stroke_dash.offset and stroke_dashoffset_set. */
}
-
- /* TODO: deal with filters */
}