forked from enlightenment/efl
vg_load_svg: Add points copy of missing polygon/polyline
Summary: When using <use> node, do atrribute copy. At that time, when target(url) is polygon or polyline, points array is not copied, causing a problem in output. So, add missing array copy. Test Plan: - Test SVG code <svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 64 64" enable-background="new 0 0 64 64" xml:space="preserve"> <g opacity="0.5"> <defs> <polygon id="test" opacity="0.5" points="41.8,14.5 22.2,14.5 22.2,22.8 41.8,40.7"/> </defs> <use xlink:href="#test" overflow="visible"/> </g> </svg> Reviewers: Hermet, smohanty Reviewed By: Hermet Subscribers: #reviewers, #committers, kimcinoo, herb, cedric Tags: #efl Differential Revision: https://phab.enlightenment.org/D12174
This commit is contained in:
parent
0742a6c78e
commit
862e65c260
|
@ -1651,10 +1651,12 @@ _copy_attribute(Svg_Node *to, Svg_Node *from)
|
|||
case SVG_NODE_POLYGON:
|
||||
to->node.polygon.points_count = from->node.polygon.points_count;
|
||||
to->node.polygon.points = calloc(to->node.polygon.points_count, sizeof(double));
|
||||
memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double));
|
||||
break;
|
||||
case SVG_NODE_POLYLINE:
|
||||
to->node.polyline.points_count = from->node.polyline.points_count;
|
||||
to->node.polyline.points = calloc(to->node.polyline.points_count, sizeof(double));
|
||||
memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double));
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue