diff options
author | Federico Mena Quintero <federico@gnome.org> | 2018-02-21 16:58:12 -0600 |
---|---|---|
committer | Federico Mena Quintero <federico@gnome.org> | 2018-02-21 17:44:49 -0600 |
commit | 5bb014941d5141294d560a8b8c4836220dcaaf08 (patch) | |
tree | 4fc97fd64bb9206b94b2d8545816be39a70db7ec /rsvg-filter.c | |
parent | b08533c3a70bc9fcaa6de4d4b798567e7e7ef9fe (diff) | |
download | librsvg-5bb014941d5141294d560a8b8c4836220dcaaf08.tar.gz |
rsvg_filter_primitive_merge_set_atts(): Parse attributes with the PHF
Diffstat (limited to 'rsvg-filter.c')
-rw-r--r-- | rsvg-filter.c | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/rsvg-filter.c b/rsvg-filter.c index 24d18910..9eece208 100644 --- a/rsvg-filter.c +++ b/rsvg-filter.c @@ -2369,12 +2369,27 @@ static void rsvg_filter_primitive_merge_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPropertyBag atts) { RsvgFilterPrimitiveMerge *filter = impl; + RsvgPropertyBagIter *iter; + const char *key; + RsvgAttribute attr; const char *value; - if ((value = rsvg_property_bag_lookup (atts, "result"))) - g_string_assign (filter->super.result, value); - filter_primitive_set_x_y_width_height_atts ((RsvgFilterPrimitive *) filter, atts); + + iter = rsvg_property_bag_iter_begin (atts); + + while (rsvg_property_bag_iter_next (iter, &key, &attr, &value)) { + switch (attr) { + case RSVG_ATTRIBUTE_RESULT: + g_string_assign (filter->super.result, value); + break; + + default: + break; + } + } + + rsvg_property_bag_iter_end (iter); } RsvgNode * |