tvgSvgLoader: Fix wrong bracket

This commit is contained in:
JunsuChoi 2020-10-13 10:00:03 +09:00 committed by Hermet Park
parent e73cf7db60
commit 098c94819c
2 changed files with 3 additions and 4 deletions

View file

@ -1445,7 +1445,7 @@ static SvgNode* _findChildById(SvgNode* node, const char* id)
static SvgNode* _findNodeById(SvgNode *node, string* id)
{
SvgNode* result = nullptr;
if ((node->id != nullptr) && !node->id->compare(*id)) return node;
if (node->id && !node->id->compare(*id)) return node;
if (node->child.cnt > 0) {
auto child = node->child.list;

View file

@ -359,10 +359,10 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
(*child)->style->opacity = ((*child)->style->opacity * node->style->opacity) / 255.0f;
scene->push(_shapeBuildHelper(*child, vx, vy, vw, vh));
}
}
//Apply composite node
if (node->style->comp.node) {
//Composite ClipPath
//Composite ClipPath
if (((int)node->style->comp.flags & (int)SvgCompositeFlags::ClipPath)) {
auto compNode = node->style->comp.node;
if (compNode->child.cnt > 0) {
@ -373,7 +373,6 @@ unique_ptr<Scene> _sceneBuildHelper(SvgNode* node, float vx, float vy, float vw,
}
}
}
}
}
return scene;
}