[lasem] svg: add a hack for support of xml:id.
- From: Emmanuel Pacaud <emmanuel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [lasem] svg: add a hack for support of xml:id.
- Date: Sun, 8 Aug 2010 14:13:48 +0000 (UTC)
commit 076fc4a81015014253ac8ce5f17ff7b8143d80a4
Author: Emmanuel Pacaud <emmanuel gnome org>
Date: Sun Aug 8 16:10:55 2010 +0200
svg: add a hack for support of xml:id.
I should try to handle the namespaces correctly.
src/lsmsvgelement.c | 8 +++++++-
src/lsmsvgview.c | 2 ++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/lsmsvgelement.c b/src/lsmsvgelement.c
index 8e6160d..5b18d6a 100644
--- a/src/lsmsvgelement.c
+++ b/src/lsmsvgelement.c
@@ -65,7 +65,8 @@ lsm_svg_element_set_attribute (LsmDomElement *self, const char* name, const char
self, name, value))
lsm_svg_property_bag_set_property (&s_element->property_bag, name, value);
- if (g_strcmp0 (name, "id") == 0) {
+ if (g_strcmp0 (name, "id") == 0 ||
+ g_strcmp0 (name, "xml:id") == 0) {
LsmDomDocument *document;
document = lsm_dom_node_get_owner_document (LSM_DOM_NODE (self));
@@ -266,6 +267,11 @@ static const LsmAttributeInfos lsm_svg_attribute_infos[] = {
.attribute_offset = offsetof (LsmSvgElement, id)
},
{
+ .name = "xml:id",
+ .trait_class = &lsm_null_trait_class,
+ .attribute_offset = offsetof (LsmSvgElement, id)
+ },
+ {
.name = "class",
.trait_class = &lsm_null_trait_class,
.attribute_offset = offsetof (LsmSvgElement, class_name)
diff --git a/src/lsmsvgview.c b/src/lsmsvgview.c
index 727f466..b815e65 100644
--- a/src/lsmsvgview.c
+++ b/src/lsmsvgview.c
@@ -700,6 +700,8 @@ _paint_url (LsmSvgView *view, LsmSvgViewPaintOperation operation, const char *ur
!LSM_IS_SVG_PATTERN_ELEMENT (element))
return;
+ lsm_debug ("render", "[LsmSvgView::_paint_url] Paint using '%s'", url);
+
cairo_path_extents (view->dom_view.cairo, &x1, &y1, &x2, &y2);
extents.x = x1;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]