2 dimensions-scheme.cc -- implement Dimension handling
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
9 #include "lily-guile.hh"
10 #include "dimensions.hh"
13 LY_DEFINE (ly_pt
, "ly:pt",
15 "@var{num} printer points.")
17 LY_ASSERT_TYPE (scm_is_number
, num
, 1);
18 return scm_from_double (point_constant
19 * scm_to_double (num
));
22 LY_DEFINE (ly_cm
, "ly:cm",
26 LY_ASSERT_TYPE (scm_is_number
, num
, 1);
27 return scm_from_double (cm_constant
28 * scm_to_double (num
));
31 LY_DEFINE (ly_inch
, "ly:inch",
35 LY_ASSERT_TYPE (scm_is_number
, num
, 1);
36 return scm_from_double (inch_constant
37 * scm_to_double (num
));
40 LY_DEFINE (ly_mm
, "ly:mm",
44 LY_ASSERT_TYPE (scm_is_number
, num
, 1);
45 return scm_from_double (mm_constant
46 * scm_to_double (num
));
49 LY_DEFINE (ly_bp
, "ly:bp",
51 "@var{num} bigpoints (1/72th inch).")
53 LY_ASSERT_TYPE (scm_is_number
, num
, 1);
54 return scm_from_double (bigpoint_constant
55 * scm_to_double (num
));