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
600B

  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, FramebufferWidget {
  11. TransformWidget *tw;
  12. SVGWidget *sw;
  13. CircularShadow *shadow;
  14. /** Angles in radians */
  15. float minAngle, maxAngle;
  16. SVGKnob();
  17. void setSVG(std::shared_ptr<SVG> svg);
  18. void step() override;
  19. void onChange(event::Change &e) override;
  20. };
  21. } // namespace rack