X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fdimensions.hh;h=a0e2f25edd9203e83f24288e4dde9c1c6b2db5ad;hb=dcfcbd379ad43840e3b3931974c32e1a2fd898c1;hp=13eab8db9fa13db7ff881889a2d1ff3160f626b9;hpb=029137c21a30934db946d7ac4d3d5e187484e269;p=lilypond.git diff --git a/lily/include/dimensions.hh b/lily/include/dimensions.hh index 13eab8db9f..a0e2f25edd 100644 --- a/lily/include/dimensions.hh +++ b/lily/include/dimensions.hh @@ -2,8 +2,7 @@ #define DIMENSIONS_HH #include "real.hh" -class String; - +#include "std-string.hh" const Real INCH_TO_PT = 72.270; const Real CM_TO_PT = (INCH_TO_PT / 2.54); @@ -18,27 +17,32 @@ const Real PT_TO_MM = (1.0 / MM_TO_PT); #define INTERNAL_UNIT "pt" -#define PT * (PT_TO_PT) -#define MM * (MM_TO_PT) -#define CM * (CM_TO_PT) -#define INCH * (INCH_TO_PT) -#define BIGPOINT * (BIGPOINT_TO_POINT) -#define CHAR * (CHAR_TO_PT) +#define PT *(PT_TO_PT) +#define MM *(MM_TO_PT) +#define CM *(CM_TO_PT) +#define INCH *(INCH_TO_PT) +#define BIGPOINT *(BIGPOINT_TO_POINT) +#define CHAR *(CHAR_TO_PT) -#else // mm +#else // mm #define INTERNAL_UNIT "mm" -#define PT * (PT_TO_PT * PT_TO_MM) -#define MM * (MM_TO_PT * PT_TO_MM) -#define CM * (CM_TO_PT *PT_TO_MM) -#define INCH * (INCH_TO_PT * PT_TO_MM) -#define BIGPOINT * (BIGPOINT_TO_POINT * PT_TO_MM) -#define CHAR * (CHAR_TO_PT * PT_TO_MM) +#define PT *(PT_TO_PT *PT_TO_MM) +#define MM *(MM_TO_PT *PT_TO_MM) +#define CM *(CM_TO_PT *PT_TO_MM) +#define INCH *(INCH_TO_PT *PT_TO_MM) +#define BIGPOINT *(BIGPOINT_TO_POINT *PT_TO_MM) +#define CHAR *(CHAR_TO_PT *PT_TO_MM) #endif -String print_dimen (Real); +string print_dimen (Real); +const Real point_constant = 1 PT; +const Real inch_constant = 1 INCH; +const Real cm_constant = 1 CM; +const Real mm_constant = 1 MM; +const Real bigpoint_constant = 1 BIGPOINT; #endif /* DIMENSIONS_HH */