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.

26 lines
502B

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