~ubuntu-branches/ubuntu/precise/lilypond/precise

« back to all changes in this revision

Viewing changes to lily/include/dimensions.hh

  • Committer: Bazaar Package Importer
  • Author(s): Thomas Bushnell, BSG
  • Date: 2006-12-19 10:18:12 UTC
  • mfrom: (3.1.4 feisty)
  • Revision ID: james.westby@ubuntu.com-20061219101812-7awtjkp0i393wxty
Tags: 2.8.7-3
scripts/midi2ly.py: When setting DATADIR, find Lilypond python files
in the @TOPLEVEL_VERSION@ directory, not 'current'.  Patch thanks to
Chris Lamb (chris@chris-lamb.co.uk).  (Closes: #400550)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
#define DIMENSIONS_HH
3
3
 
4
4
#include "real.hh"
5
 
class String;
6
 
 
7
 
 
8
 
const Real INCH_TO_PT=72.270;
9
 
const Real CM_TO_PT=(INCH_TO_PT/2.54);
10
 
const Real MM_TO_PT=(CM_TO_PT/10);
11
 
const Real PT_TO_PT =1.0;
 
5
#include "std-string.hh"
 
6
 
 
7
const Real INCH_TO_PT = 72.270;
 
8
const Real CM_TO_PT = (INCH_TO_PT / 2.54);
 
9
const Real MM_TO_PT = (CM_TO_PT / 10);
 
10
const Real PT_TO_PT = 1.0;
12
11
const Real INCH_TO_BP = 72;
13
 
const Real BIGPOINT_TO_POINT = (INCH_TO_PT/ INCH_TO_BP);
14
 
const Real CHAR_TO_PT =1.0;
15
 
const Real PT_TO_MM = (1.0/MM_TO_PT);
 
12
const Real BIGPOINT_TO_POINT = (INCH_TO_PT / INCH_TO_BP);
 
13
const Real CHAR_TO_PT = 1.0;
 
14
const Real PT_TO_MM = (1.0 / MM_TO_PT);
16
15
 
17
16
#ifdef POINTS
18
17
 
19
 
#define PT  *PT_TO_PT
20
 
#define MM  *MM_TO_PT
21
 
#define CM  *CM_TO_PT
22
 
#define INCH *INCH_TO_PT
23
 
#define BIGPOINT *BIGPOINT_TO_POINT
24
 
#define CHAR *CHAR_TO_PT
25
 
 
26
 
 
27
18
#define INTERNAL_UNIT "pt"
28
19
 
29
 
#else   // mm
30
 
 
31
 
#define PT  *PT_TO_PT *PT_TO_MM
32
 
#define MM  *MM_TO_PT *PT_TO_MM
33
 
#define CM  *CM_TO_PT *PT_TO_MM
34
 
#define INCH *INCH_TO_PT *PT_TO_MM
35
 
#define BIGPOINT *BIGPOINT_TO_POINT *PT_TO_MM
36
 
#define CHAR *CHAR_TO_PT *PT_TO_MM
 
20
#define PT *(PT_TO_PT)
 
21
#define MM *(MM_TO_PT)
 
22
#define CM *(CM_TO_PT)
 
23
#define INCH *(INCH_TO_PT)
 
24
#define BIGPOINT *(BIGPOINT_TO_POINT)
 
25
#define CHAR *(CHAR_TO_PT)
 
26
 
 
27
#else // mm
 
28
 
37
29
#define INTERNAL_UNIT "mm"
38
30
 
 
31
#define PT *(PT_TO_PT *PT_TO_MM)
 
32
#define MM *(MM_TO_PT *PT_TO_MM)
 
33
#define CM *(CM_TO_PT *PT_TO_MM)
 
34
#define INCH *(INCH_TO_PT *PT_TO_MM)
 
35
#define BIGPOINT *(BIGPOINT_TO_POINT *PT_TO_MM)
 
36
#define CHAR *(CHAR_TO_PT *PT_TO_MM)
 
37
 
39
38
#endif
40
39
 
41
 
String print_dimen (Real);
 
40
string print_dimen (Real);
 
41
const Real point_constant = 1 PT;
 
42
const Real inch_constant = 1 INCH;
 
43
const Real cm_constant = 1 CM;
 
44
const Real mm_constant = 1 MM;
 
45
const Real bigpoint_constant = 1 BIGPOINT;
42
46
 
43
 
#endif // DIMENSIONS_HH
 
47
#endif /* DIMENSIONS_HH */
44
48