]> git.donarmstrong.com Git - lilypond.git/blob - lily/grace-align-item.cc
release: 1.1.51
[lilypond.git] / lily / grace-align-item.cc
1 /*   
2   grace-align-item.cc --  implement Grace_align_item
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #include "grace-align-item.hh"
11 #include "lookup.hh"
12
13 Grace_align_item::Grace_align_item ()
14 {
15   stacking_dir_ = RIGHT;
16   set_axis (X_AXIS);
17 }
18   
19 void
20 Grace_align_item::do_pre_processing ()
21 {
22   Real nhw = lookup_l ()->notehead (2, "").dim_[X_AXIS].length();
23   threshold_interval_[MIN] = nhw* 1.5;
24   
25   Axis_align_item::do_pre_processing ();
26   Note_head_side::do_pre_processing ();
27
28   translate_axis (-0.5* nhw, X_AXIS); // ugh.
29 }
30
31 void
32 Grace_align_item::do_substitute_element_pointer (Score_element*o, Score_element*n)
33 {
34   Axis_align_item::do_substitute_element_pointer (o,n);
35   Note_head_side::do_substitute_element_pointer( o,n);
36 }