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.

31 lines
535B

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