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.

29 lines
588B

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