mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
loaders svg: ++ log info for wrong situation.
if either log is printed, we need to improve the composition method.
This commit is contained in:
parent
605a3bf175
commit
adf1312a5e
1 changed files with 6 additions and 0 deletions
|
@ -858,6 +858,9 @@ static void _handleTransformAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node
|
||||||
static void _handleClipPathAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node, const char* value)
|
static void _handleClipPathAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node, const char* value)
|
||||||
{
|
{
|
||||||
SvgStyleProperty* style = node->style;
|
SvgStyleProperty* style = node->style;
|
||||||
|
#ifdef THORVG_LOG_ENABLED
|
||||||
|
if (style->comp.method != CompositeMethod::None) printf("SVG: Multiple Composition Tried!\n");
|
||||||
|
#endif
|
||||||
style->comp.method = CompositeMethod::ClipPath;
|
style->comp.method = CompositeMethod::ClipPath;
|
||||||
int len = strlen(value);
|
int len = strlen(value);
|
||||||
if (len >= 3 && !strncmp(value, "url", 3)) style->comp.url = _idFromUrl((const char*)(value + 3));
|
if (len >= 3 && !strncmp(value, "url", 3)) style->comp.url = _idFromUrl((const char*)(value + 3));
|
||||||
|
@ -866,6 +869,9 @@ static void _handleClipPathAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node,
|
||||||
static void _handleMaskAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node, const char* value)
|
static void _handleMaskAttr(TVG_UNUSED SvgLoaderData* loader, SvgNode* node, const char* value)
|
||||||
{
|
{
|
||||||
SvgStyleProperty* style = node->style;
|
SvgStyleProperty* style = node->style;
|
||||||
|
#ifdef THORVG_LOG_ENABLED
|
||||||
|
if (style->comp.method != CompositeMethod::None) printf("SVG: Multiple Composition Tried!\n");
|
||||||
|
#endif
|
||||||
style->comp.method = CompositeMethod::AlphaMask;
|
style->comp.method = CompositeMethod::AlphaMask;
|
||||||
int len = strlen(value);
|
int len = strlen(value);
|
||||||
if (len >= 3 && !strncmp(value, "url", 3)) style->comp.url = _idFromUrl((const char*)(value + 3));
|
if (len >= 3 && !strncmp(value, "url", 3)) style->comp.url = _idFromUrl((const char*)(value + 3));
|
||||||
|
|
Loading…
Add table
Reference in a new issue