mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-14 12:04:29 +00:00
tvg_loader: TVGLOG added in case an unknown fill or stroke tag used
This commit is contained in:
parent
875e200767
commit
b12421b4d1
1 changed files with 11 additions and 3 deletions
|
@ -225,6 +225,10 @@ static unique_ptr<Fill> _parseShapeFill(const char *ptr, const char *end)
|
||||||
fillGrad->colorStops(stops, stopsCnt);
|
fillGrad->colorStops(stops, stopsCnt);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
TVGLOG("TVG", "Unsupported tag %d (0x%x) used as one of the fill properties, %d bytes skipped", block.type, block.type, block.length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ptr = block.end;
|
ptr = block.end;
|
||||||
}
|
}
|
||||||
|
@ -286,6 +290,10 @@ static bool _parseShapeStroke(const char *ptr, const char *end, Shape *shape)
|
||||||
if (!_parseShapeStrokeDashPattern(block.data, block.end, shape)) return false;
|
if (!_parseShapeStrokeDashPattern(block.data, block.end, shape)) return false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
TVGLOG("TVG", "Unsupported tag %d (0x%x) used as one of stroke properties, %d bytes skipped", block.type, block.type, block.length);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ptr = block.end;
|
ptr = block.end;
|
||||||
}
|
}
|
||||||
|
@ -382,7 +390,7 @@ static Paint* _parsePaint(TvgBinBlock baseBlock)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
TVGERR("TVG", "Invalid Paint Type (%d)", baseBlock.type);
|
TVGERR("TVG", "Invalid Paint Type %d (0x%x)", baseBlock.type, baseBlock.type);
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -394,7 +402,7 @@ static Paint* _parsePaint(TvgBinBlock baseBlock)
|
||||||
auto block = _readBlock(ptr);
|
auto block = _readBlock(ptr);
|
||||||
if (block.end > baseBlock.end) return paint;
|
if (block.end > baseBlock.end) return paint;
|
||||||
if (!parser(block, paint)) {
|
if (!parser(block, paint)) {
|
||||||
TVGERR("TVG", "Encountered the wrong paint properties... Paint Class (%d)", baseBlock.type);
|
TVGERR("TVG", "Encountered the wrong paint properties... Paint Class %d (0x%x)", baseBlock.type, baseBlock.type);
|
||||||
return paint;
|
return paint;
|
||||||
}
|
}
|
||||||
ptr = block.end;
|
ptr = block.end;
|
||||||
|
@ -424,4 +432,4 @@ unique_ptr<Scene> TvgBinInterpreter::run(const char *ptr, const char* end)
|
||||||
}
|
}
|
||||||
|
|
||||||
return scene;
|
return scene;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue