summaryrefslogtreecommitdiff
path: root/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2020-10-12 18:35:11 +0900
committerHermet Park <chuneon.park@samsung.com>2020-10-12 18:35:12 +0900
commit8e988bad4626062f74979c2f95e9577cf2b4f7b8 (patch)
treece146f49a548e67997070eee7a9e57469495b390 /src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
parent0c3f0f897441b564b809b5f86198f494d2ec061d (diff)
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
Diffstat (limited to '')
-rw-r--r--src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
index 246e3e2a0e..721851e4fd 100644
--- a/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
+++ b/src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
@@ -1651,10 +1651,12 @@ _copy_attribute(Svg_Node *to, Svg_Node *from)
1651 case SVG_NODE_POLYGON: 1651 case SVG_NODE_POLYGON:
1652 to->node.polygon.points_count = from->node.polygon.points_count; 1652 to->node.polygon.points_count = from->node.polygon.points_count;
1653 to->node.polygon.points = calloc(to->node.polygon.points_count, sizeof(double)); 1653 to->node.polygon.points = calloc(to->node.polygon.points_count, sizeof(double));
1654 memcpy(to->node.polygon.points, from->node.polygon.points, to->node.polygon.points_count * sizeof(double));
1654 break; 1655 break;
1655 case SVG_NODE_POLYLINE: 1656 case SVG_NODE_POLYLINE:
1656 to->node.polyline.points_count = from->node.polyline.points_count; 1657 to->node.polyline.points_count = from->node.polyline.points_count;
1657 to->node.polyline.points = calloc(to->node.polyline.points_count, sizeof(double)); 1658 to->node.polyline.points = calloc(to->node.polyline.points_count, sizeof(double));
1659 memcpy(to->node.polyline.points, from->node.polyline.points, to->node.polyline.points_count * sizeof(double));
1658 break; 1660 break;
1659 default: 1661 default:
1660 break; 1662 break;