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.

32 lines
514B

  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) {
  14. setSvg(svg);
  15. }
  16. void draw(const DrawArgs& args) override;
  17. };
  18. DEPRECATED typedef SvgWidget SVGWidget;
  19. } // namespace widget
  20. } // namespace rack