diff --git a/src/examples/PicturePng.cpp b/src/examples/PicturePng.cpp index 4d85a3db..9dd6a037 100644 --- a/src/examples/PicturePng.cpp +++ b/src/examples/PicturePng.cpp @@ -32,7 +32,10 @@ void tvgDrawCmds(tvg::Canvas* canvas) for (int i = 0; i < 5; ++i) { auto picture = tvg::Picture::gen(); - if (picture->load(EXAMPLE_DIR"/logo.png") != tvg::Result::Success) return; + if (picture->load(EXAMPLE_DIR"/logo.png") != tvg::Result::Success) { + cout << "PNG is not supported, Did you enable PNG Loader??" << endl; + return; + } picture->translate(i* 150, i * 150); picture->rotate(30 * i); picture->scale(0.25); diff --git a/src/examples/Tvg.cpp b/src/examples/Tvg.cpp index 23874d7e..9c08480f 100644 --- a/src/examples/Tvg.cpp +++ b/src/examples/Tvg.cpp @@ -31,7 +31,10 @@ void tvgDrawCmds(tvg::Canvas* canvas) if (!canvas) return; auto picture = tvg::Picture::gen(); - picture->load(EXAMPLE_DIR"/test.tvg"); + if (picture->load(EXAMPLE_DIR"/test.tvg") != tvg::Result::Success) { + cout << "TVG is not supported, Did you enable TVG Loader??" << endl; + return; + } canvas->push(move(picture)); } @@ -139,4 +142,4 @@ int main(int argc, char **argv) cout << "engine is not supported" << endl; } return 0; -} \ No newline at end of file +}