mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
tvg_saver: do not merge if the shapes have outlines.
Merged shapes with outlines expects the layered, unfortunately tvg can't cover the situation. @Issues: https://github.com/Samsung/thorvg/issues/783
This commit is contained in:
parent
e5f8bc99b7
commit
ee7dc1352e
3 changed files with 4 additions and 0 deletions
Binary file not shown.
Binary file not shown.
|
@ -108,6 +108,10 @@ static bool _merge(Shape* from, Shape* to)
|
|||
if (r != r2 || g != g2 || b != b2 || a != a2) return false;
|
||||
|
||||
if (fabs(from->strokeWidth() - to->strokeWidth()) > FLT_EPSILON) return false;
|
||||
|
||||
//OPTIMIZE: Yet we can't merge outlining shapes unless we can support merging shapes feature.
|
||||
if (from->strokeWidth() > 0 || to->strokeWidth() > 0) return false;
|
||||
|
||||
if (from->strokeCap() != to->strokeCap()) return false;
|
||||
if (from->strokeJoin() != to->strokeJoin()) return false;
|
||||
if (from->strokeDash(nullptr) > 0 || to->strokeDash(nullptr) > 0) return false;
|
||||
|
|
Loading…
Add table
Reference in a new issue