]> git.donarmstrong.com Git - lilypond.git/blob - lily/dimension-cache.cc
* lily/grob.cc: remove X-extent-callback / Y-extent-callback.
[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
10 #include "dimension-cache.hh"
11 #include "warn.hh"
12 #include "grob.hh"
13
14 Dimension_cache::Dimension_cache (Dimension_cache const &d)
15 {
16   init ();
17   offset_ = d.offset_;
18   offset_callbacks_ = d.offset_callbacks_;
19   offsets_left_ = d.offsets_left_;
20   parent_ = d.parent_;
21   extent_ = d.extent_ ? new Interval (*d.extent_) : 0;
22 }
23
24 Dimension_cache::Dimension_cache ()
25 {
26   init ();
27 }
28
29 void
30 Dimension_cache::init ()
31 {
32   offsets_left_ = 0;
33   offset_callbacks_ = SCM_EOL;
34   offset_ = 0.0;
35   extent_ = 0;
36   parent_ = 0;
37 }
38
39 Dimension_cache::~Dimension_cache ()
40 {
41   delete extent_;
42 }