mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
examples: ignoring pictures other than svgs in Stress.cpp
The picture->size() function does not work for raw/png pictures. As a consequence enabling both, the svg and png file loaders, resulted in the unintended behavior of the example.
This commit is contained in:
parent
5d81fe2446
commit
0f9d3ff6e9
1 changed files with 4 additions and 0 deletions
|
@ -38,6 +38,10 @@ static double t1, t2, t3, t4;
|
|||
|
||||
void svgDirCallback(const char* name, const char* path, void* data)
|
||||
{
|
||||
//ignore if not svgs.
|
||||
const char *ext = name + strlen(name) - 3;
|
||||
if (strcmp(ext, "svg")) return;
|
||||
|
||||
auto picture = tvg::Picture::gen();
|
||||
|
||||
char buf[PATH_MAX];
|
||||
|
|
Loading…
Add table
Reference in a new issue