[librsvg: 81/95] rsvg_filter_primitive_flood_set_atts(): Parse attributes with the PHF
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librsvg: 81/95] rsvg_filter_primitive_flood_set_atts(): Parse attributes with the PHF
- Date: Thu, 22 Feb 2018 03:19:56 +0000 (UTC)
commit 8d62c118b28fed2faef756cda4c93b4130763f5b
Author: Federico Mena Quintero <federico gnome org>
Date: Wed Feb 21 17:28:15 2018 -0600
rsvg_filter_primitive_flood_set_atts(): Parse attributes with the PHF
rsvg-filter.c | 21 ++++++++++++++++++---
1 file changed, 18 insertions(+), 3 deletions(-)
---
diff --git a/rsvg-filter.c b/rsvg-filter.c
index 70187581..4532fdd0 100644
--- a/rsvg-filter.c
+++ b/rsvg-filter.c
@@ -3563,12 +3563,27 @@ static void
rsvg_filter_primitive_flood_set_atts (RsvgNode *node, gpointer impl, RsvgHandle *handle, RsvgPropertyBag
atts)
{
RsvgFilterPrimitive *filter = impl;
+ RsvgPropertyBagIter *iter;
+ const char *key;
+ RsvgAttribute attr;
const char *value;
- if ((value = rsvg_property_bag_lookup (atts, "result")))
- g_string_assign (filter->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->result, value);
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ rsvg_property_bag_iter_end (iter);
}
RsvgNode *
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]