forked from enlightenment/efl
evas_vg_load_svg: Fix color parsing
Summary: Remove unnecessary point movement in rgb(255, 255, 255) case in svg parsing. In svg parsing, move the pointer by 'rgb(' before calling _color_parser() in the rgb(255, 255, 255) case. In function, string pointer moved unnecessary, so parsing is incorrect. Therefore, remove unnecessary point movement. Test Plan: svg sample code ``` <svg xmlns:svg="http://www.w3.org/2000/svg" viewBox="0 0 300 300"> <path d="M 0 0 h 200 v 200 z" style="fill:rgb(255, 155, 55);"/> </svg> ``` before {F4504779} after {F4504778} Reviewers: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12284
This commit is contained in:
parent
7a26c09309
commit
fe60e94007
|
@ -337,7 +337,7 @@ _color_parser(const char *value, char **end)
|
||||||
{
|
{
|
||||||
double r;
|
double r;
|
||||||
|
|
||||||
r = eina_convert_strtod_c(value + 4, end);
|
r = eina_convert_strtod_c(value, end);
|
||||||
*end = _skip_space(*end, NULL);
|
*end = _skip_space(*end, NULL);
|
||||||
if (**end == '%')
|
if (**end == '%')
|
||||||
r = 255 * r / 100;
|
r = 255 * r / 100;
|
||||||
|
|
Loading…
Reference in New Issue