]> git.donarmstrong.com Git - lilypond.git/blob - lily/atom.cc
release: 1.3.28
[lilypond.git] / lily / atom.cc
1 /*
2   atom.cc -- implement Atom
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include <math.h>
10
11 #include "atom.hh"
12 #include "lookup.hh"
13 #include "global-ctor.hh"
14 #include "font-metric.hh"
15
16
17 #if 0
18 SCM translate_sym;
19
20 static void init()
21 {
22   translate_sym = sly_symbol2scm ("translate-atom");
23 }
24
25 ADD_SCM_INIT_FUNC(atom, init);
26 #endif
27
28 SCM
29 translate_atom (Offset o, SCM func)
30 {
31   return gh_list (ly_symbol2scm ("translate-atom"),
32                   ly_quote_scm (ly_offset2scm (o)),
33                   func,
34                   SCM_UNDEFINED);
35 }
36
37 SCM
38 translate_atom_axis (Real r, Axis a, SCM func)
39 {
40   //  off_[a] += r;
41   Offset o ;
42   o[a] = r;
43   return gh_list (ly_symbol2scm ("translate-atom"),
44                   ly_quote_scm (ly_offset2scm (o)),
45                   func,
46                   SCM_UNDEFINED);
47 }
48
49
50 SCM
51 fontify_atom(Font_metric * met, SCM f)
52 {
53   return  gh_list (ly_symbol2scm ("fontify"),
54                    ly_quote_scm (met->description ()), f, SCM_UNDEFINED);
55 }