HomePhabricator

evas_vg_load_svg: Prevent duplicate operations on radial gradient variables

Authored by jsuya on Jul 15 2019, 5:22 AM.

Description

evas_vg_load_svg: Prevent duplicate operations on radial gradient variables

Summary:
This solves the problem of radial gradient being displayed
abnormally when the radial gradient variables are 0 to 1.

Test Plan:
Sample SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">

<defs
   id="defs11">
  <linearGradient id="linearGradient1" x1="0" y1="0" x2="0.2" y2="0.2" spreadMethod="reflect">
    <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
    <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
  </linearGradient>
  <radialGradient id="radialGradient222" r="0.2" cx="0.3" cy="0.3" spreadMethod="reflect">
    <stop style="stop-color:#ffFF00;stop-opacity:1;" offset="0"/>
    <stop style="stop-color:#00FFff;stop-opacity:1;" offset="1"/>
  </radialGradient>
</defs>
<rect x="0" y="0" width="100" height="100" fill="url(#linearGradient1)"/>
<rect x="50" y="50" width="50" height="50" fill="url(#radialGradient222)"/>

</svg>

Reviewers: Hermet, kimcinoo, smohanty

Subscribers: cedric, reviewers, committers

Tags: efl

Differential Revision: https://phab.enlightenment.org/D9312