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:
Hermet Park 2021-09-15 21:05:20 +09:00 committed by Hermet Park
parent e5f8bc99b7
commit ee7dc1352e
3 changed files with 4 additions and 0 deletions

Binary file not shown.

View file

@ -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;