Page MenuHomePhabricator

evas_vg_load_svg: Prevent duplicate operations on radial gradient variables
ClosedPublic

Authored by jsuya on Jul 14 2019, 6:59 PM.

Details

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>

Diff Detail

Repository
rEFL core/efl
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 12215
Build 8918: arc lint + arc unit
jsuya created this revision.Jul 14 2019, 6:59 PM
jsuya requested review of this revision.Jul 14 2019, 6:59 PM
jsuya updated this revision to Diff 23362.Jul 15 2019, 1:12 AM

update patch

jsuya updated this revision to Diff 23363.Jul 15 2019, 1:13 AM
jsuya retitled this revision from vg_common_svg: Prevent duplicate operations on radial gradient variables to evas_vg_load_svg: Prevent duplicate operations on radial gradient variables.

update commit title

Hermet accepted this revision.Jul 15 2019, 2:40 AM
This revision is now accepted and ready to land.Jul 15 2019, 2:40 AM
Hermet requested changes to this revision.Jul 15 2019, 3:00 AM

Please check a comment.

src/modules/evas/vg_loaders/svg/evas_vg_load_svg.c
1886

This might need an optional, normalized input values will be broken after this.
I think only percentage values (i.e 80%) should be applied with this, LinearGradient as well.

Please check src/examples/edje/svg.edc (radialGrad1.svg), it won't work after this patch.
but that svg is working fine in chrome browser,

This revision now requires changes to proceed.Jul 15 2019, 3:00 AM
jsuya updated this revision to Diff 23364.Jul 15 2019, 3:53 AM

@Hermet
Update patch
src/examples/edje/svg.edc (radialGrad1.svg) is work well
i added missing code.
this patch is same 5403af9.

Hermet accepted this revision.Jul 15 2019, 5:22 AM
This revision is now accepted and ready to land.Jul 15 2019, 5:22 AM
This revision was automatically updated to reflect the committed changes.