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.

33 lines
550B

  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. SvgWidget();
  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<window::Svg> svg);
  13. DEPRECATED void setSVG(std::shared_ptr<window::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