forked from enlightenment/efl
svg_parse: Support gradient when <defs/> is not declared.
Summary: Even if linear or radius gradient is declared, it will not be output if there is no <defs/> It can be supported because it stores the declared gradient in loader.gradient. Test Plan: N/A Reviewers: Hermet, smohanty Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8591
This commit is contained in:
parent
b736697ec7
commit
9dc611784e
|
@ -2297,6 +2297,15 @@ evas_vg_load_file_open_svg(Eina_File *file,
|
||||||
defs = loader.doc->node.doc.defs;
|
defs = loader.doc->node.doc.defs;
|
||||||
if (defs)
|
if (defs)
|
||||||
_update_gradient(loader.doc, defs->node.defs.gradients);
|
_update_gradient(loader.doc, defs->node.defs.gradients);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (loader.gradient)
|
||||||
|
{
|
||||||
|
Eina_List* gradient_list = eina_list_append(NULL, loader.gradient);
|
||||||
|
_update_gradient(loader.doc, gradient_list);
|
||||||
|
eina_list_free(gradient_list);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
*error = EVAS_LOAD_ERROR_NONE;
|
*error = EVAS_LOAD_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue