| 19 | |
| 20 | |
| 21 | void Svg::loadFile(const std::string& filename) { |
| 22 | if (handle) |
| 23 | nsvgDelete(handle); |
| 24 | |
| 25 | handle = nsvgParseFromFile(filename.c_str(), "px", SVG_DPI); |
| 26 | if (!handle) |
| 27 | throw Exception("Failed to load SVG %s", filename.c_str()); |
| 28 | INFO("Loaded SVG %s", filename.c_str()); |
| 29 | } |
| 30 | |
| 31 | |
| 32 | void Svg::loadString(const std::string& str) { |