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.

common.hpp 743B

1234567891011121314151617181920212223242526
  1. #pragma once
  2. #include <jansson.h>
  3. #include <common.hpp>
  4. #include <ui/common.hpp>
  5. #include <svg.hpp> // for mm2px(), etc
  6. namespace rack {
  7. /** Rack-specific GUI widgets and functions that control and offer feedback for the rack state.
  8. */
  9. namespace app {
  10. // A 1HPx3U module should be 15x380 pixels. Thus the width of a module should be a factor of 15.
  11. static const float RACK_GRID_WIDTH = 15;
  12. static const float RACK_GRID_HEIGHT = 380;
  13. static const math::Vec RACK_GRID_SIZE = math::Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT);
  14. static const math::Vec RACK_OFFSET = RACK_GRID_SIZE.mult(math::Vec(2000, 100));
  15. static const math::Vec BUS_BOARD_GRID_SIZE = math::Vec(RACK_GRID_WIDTH * 20, RACK_GRID_HEIGHT);
  16. } // namespace app
  17. } // namespace rack