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
511B

  1. #pragma once
  2. #include "widget/Widget.hpp"
  3. #include "svg.hpp"
  4. namespace rack {
  5. namespace widget {
  6. /** Draws an SVG */
  7. struct SvgWidget : Widget {
  8. std::shared_ptr<Svg> svg;
  9. /** Sets the box size to the svg image size */
  10. void wrap();
  11. /** Sets and wraps the SVG */
  12. void setSvg(std::shared_ptr<Svg> svg);
  13. DEPRECATED void setSVG(std::shared_ptr<Svg> svg) {setSvg(svg);}
  14. void draw(const DrawContext &ctx) override;
  15. };
  16. DEPRECATED typedef SvgWidget SVGWidget;
  17. } // namespace widget
  18. } // namespace rack