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.

35 lines
747B

  1. #pragma once
  2. #include "app/common.hpp"
  3. #include "app/Knob.hpp"
  4. #include "widget/FramebufferWidget.hpp"
  5. #include "widget/TransformWidget.hpp"
  6. #include "widget/SvgWidget.hpp"
  7. #include "app/CircularShadow.hpp"
  8. namespace rack {
  9. namespace app {
  10. /** A knob which rotates an SVG and caches it in a framebuffer */
  11. struct SvgKnob : Knob {
  12. widget::FramebufferWidget *fb;
  13. CircularShadow *shadow;
  14. widget::TransformWidget *tw;
  15. widget::SvgWidget *sw;
  16. /** Angles in radians */
  17. float minAngle, maxAngle;
  18. SvgKnob();
  19. void setSvg(std::shared_ptr<Svg> svg);
  20. DEPRECATED void setSVG(std::shared_ptr<Svg> svg) {setSvg(svg);}
  21. void onChange(const event::Change &e) override;
  22. };
  23. DEPRECATED typedef SvgKnob SVGKnob;
  24. } // namespace app
  25. } // namespace rack