You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
475B

  1. #pragma once
  2. #include <memory>
  3. #include <nanovg.h>
  4. #include <nanosvg.h>
  5. #include <common.hpp>
  6. namespace rack {
  7. struct Svg {
  8. NSVGimage* handle = NULL;
  9. /** Don't call this directly. Use `Svg::load()` for caching. */
  10. void loadFile(const std::string& filename);
  11. ~Svg();
  12. /** Loads Svg from a cache. */
  13. static std::shared_ptr<Svg> load(const std::string& filename);
  14. };
  15. DEPRECATED typedef Svg SVG;
  16. void svgDraw(NVGcontext* vg, NSVGimage* svg);
  17. } // namespace rack