diff options
| author | Felipe Corr??a da Silva Sanches <juca@members.fsf.org> | 2007-11-05 07:00:34 +0000 |
|---|---|---|
| committer | jucablues <jucablues@users.sourceforge.net> | 2007-11-05 07:00:34 +0000 |
| commit | 84742f7082d08e4338348a4aca1c64f4b34cd93c (patch) | |
| tree | 0a3ef3e2c9cb752b16b6c1f7a0c272b1212ec19b /src/sp-feimage.cpp | |
| parent | noop: Slight simplification now that we already require gtk >= 2.6 (and indee... (diff) | |
| download | inkscape-84742f7082d08e4338348a4aca1c64f4b34cd93c.tar.gz inkscape-84742f7082d08e4338348a4aca1c64f4b34cd93c.zip | |
partially implemented xlink:href parameter loading. (It still just
works for filenames.) Removed a hardcoded string.
This part of the code must be improved in order to reference other
pieces of SVG. I need somebody to help me on working with proper URI
handling!
Also fixed gdk pixbuf handling.
(bzr r4030)
Diffstat (limited to 'src/sp-feimage.cpp')
| -rw-r--r-- | src/sp-feimage.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/sp-feimage.cpp b/src/sp-feimage.cpp index a36015180..9456b5966 100644 --- a/src/sp-feimage.cpp +++ b/src/sp-feimage.cpp @@ -98,14 +98,12 @@ sp_feImage_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *re } /*LOAD ATTRIBUTES FROM REPR HERE*/ -/* apparently there's no attribute to load here -since 'in' and 'xlink:href' are common filter attributes. ---Juca -*/ + sp_object_read_attr(object, "x"); sp_object_read_attr(object, "y"); sp_object_read_attr(object, "width"); sp_object_read_attr(object, "height"); + sp_object_read_attr(object, "xlink:href"); } @@ -131,6 +129,11 @@ sp_feImage_set(SPObject *object, unsigned int key, gchar const *value) switch(key) { /*DEAL WITH SETTING ATTRIBUTES HERE*/ + case SP_ATTR_XLINK_HREF: + if (feImage->href) g_free(feImage->href); + feImage->href = (value) ? g_strdup (value) : NULL; + object->requestModified(SP_OBJECT_MODIFIED_FLAG); + break; case SP_ATTR_X: feImage->x.readOrUnset(value); object->requestModified(SP_OBJECT_MODIFIED_FLAG); @@ -209,6 +212,7 @@ static void sp_feImage_build_renderer(SPFilterPrimitive *primitive, NR::Filter * sp_filter_primitive_renderer_common(primitive, nr_primitive); nr_image->set_region(sp_image->x, sp_image->y, sp_image->width, sp_image->height); + nr_image->set_href(sp_image->href); } /* |
