DISTRHO Plugin Framework
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.

28 lines
565B

  1. #include "Widget.hpp"
  2. START_NAMESPACE_DISTRHO
  3. class KeyboardWidget : public Widget
  4. {
  5. public:
  6. KeyboardWidget(Window& parent) : Widget(parent)
  7. {
  8. }
  9. void onDisplay() override
  10. {
  11. const SVG &svg = SVG(MidiKeyboardResources::black_keyData,
  12. MidiKeyboardResources::black_keyWidth,
  13. MidiKeyboardResources::black_keyHeight,
  14. 1.0f);
  15. Image img = Image();
  16. img.loadFromSVG(svg);
  17. img.drawAt(0,0);
  18. }
  19. };
  20. END_NAMESPACE_DISTRHO