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.

68 lines
1.2KB

  1. #ifndef INCLUDE_SIZE_TABLE
  2. #define INCLUDE_SIZE_TABLE
  3. // Wish there was a better way to do this
  4. template< typename T >
  5. struct SizeTable
  6. {
  7. };
  8. template<>
  9. struct SizeTable< PJ301MPort >
  10. {
  11. constexpr static const float X = 24.6721;
  12. constexpr static const float Y = 24.6721;
  13. };
  14. template<>
  15. struct SizeTable< RoundHugeBlackKnob >
  16. {
  17. constexpr static const float X = 56.1034;
  18. constexpr static const float Y = 56.1034;
  19. };
  20. template<>
  21. struct SizeTable< RoundLargeBlackKnob >
  22. {
  23. constexpr static const float X = 37.5;
  24. constexpr static const float Y = 37.5;
  25. };
  26. template<>
  27. struct SizeTable< RoundBlackSnapKnob >
  28. {
  29. constexpr static const float X = 29.5287;
  30. constexpr static const float Y = 29.5287;
  31. };
  32. template<>
  33. struct SizeTable< RoundBlackKnob >
  34. {
  35. constexpr static const float X = 29.5287;
  36. constexpr static const float Y = 29.5287;
  37. };
  38. template<>
  39. struct SizeTable< DotMatrixLightTextWidget >
  40. {
  41. constexpr static const float X = 11;
  42. constexpr static const float Y = 18.5;
  43. };
  44. template<>
  45. struct SizeTable< RoundSmallBlackKnob >
  46. {
  47. constexpr static const float X = 23.6206;
  48. constexpr static const float Y = 23.6206;
  49. };
  50. // Diff Y to center
  51. template< typename T1, typename T2 >
  52. float diffY2c()
  53. {
  54. return ( SizeTable<T1>::Y - SizeTable<T2>::Y ) / 2;
  55. }
  56. #endif