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.

31 lines
644B

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