if (rect_tags[i].sz - 1 == sz && !strncmp(rect_tags[i].tag, key, sz))
{
*((double*) (array + rect_tags[i].offset)) = _to_double(loader->svg_parse, value, rect_tags[i].type);
+
+ //Case if only rx or ry is declared
+ if (!strncmp(rect_tags[i].tag, "rx", sz)) rect->has_rx = EINA_TRUE;
+ if (!strncmp(rect_tags[i].tag, "ry", sz)) rect->has_ry = EINA_TRUE;
+
+ if (!EINA_DBL_EQ(rect->rx, 0) && EINA_DBL_EQ(rect->ry, 0) && rect->has_rx && !rect->has_ry) rect->ry = rect->rx;
+ if (!EINA_DBL_EQ(rect->ry, 0) && EINA_DBL_EQ(rect->rx, 0) && !rect->has_rx && rect->has_ry) rect->rx = rect->ry;
return EINA_TRUE;
}
_parse_style_attr(loader, key, value);
}
- if (!EINA_DBL_EQ(rect->rx, 0) && EINA_DBL_EQ(rect->ry, 0)) rect->ry = rect->rx;
- if (!EINA_DBL_EQ(rect->ry, 0) && EINA_DBL_EQ(rect->rx, 0)) rect->rx = rect->ry;
return EINA_TRUE;
}
{
loader->svg_parse->node = _create_node(parent, SVG_NODE_RECT);
+ if (loader->svg_parse->node) {
+ loader->svg_parse->node->node.rect.has_rx = loader->svg_parse->node->node.rect.has_ry = EINA_FALSE;
+ }
+
eina_simple_xml_attributes_parse(buf, buflen,
_attr_parse_rect_node, loader);
return loader->svg_parse->node;
to->node.rect.h = from->node.rect.h;
to->node.rect.rx = from->node.rect.rx;
to->node.rect.ry = from->node.rect.ry;
+ to->node.rect.has_rx = from->node.rect.has_rx;
+ to->node.rect.has_ry = from->node.rect.has_ry;
break;
case SVG_NODE_LINE:
to->node.line.x1 = from->node.line.x1;