]> git.donarmstrong.com Git - lilypond.git/blob - lily/dimension-cache.cc
* flower
[lilypond.git] / lily / dimension-cache.cc
1 /*
2   dimension-cache.cc -- implement Dimension_cache
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1998--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9 #include <math.h>
10
11 #include "dimension-cache.hh"
12 #include "warn.hh"
13 #include "grob.hh"
14
15 Dimension_cache::Dimension_cache (Dimension_cache const &d)
16 {
17   init ();
18   dimension_ = d.dimension_;
19   dimension_callback_ = d.dimension_callback_;
20   offset_ = d.offset_;
21   offset_callbacks_ = d.offset_callbacks_;
22   offsets_left_ = d.offsets_left_;
23   parent_ = d.parent_;
24 }
25
26 Dimension_cache::Dimension_cache ()
27 {
28   init ();
29 }
30
31 void
32 Dimension_cache::init ()
33 {
34   dimension_ = SCM_EOL;
35   dimension_callback_ = SCM_EOL;
36
37   offsets_left_ = 0;
38   offset_callbacks_ = SCM_EOL;
39   offset_ = 0.0;
40
41   parent_ = 0;
42 }
43
44
45