2 paper-def.cc -- implement Paper_def
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "paper-def.hh"
19 const Real PHI = (1+sqrt(5))/2;
23 Paper_def::duration_to_dist(Moment d)
28 return whole_width * pow(geometric_, log_2(d));
32 Paper_def::rule_thickness()const
37 Paper_def::Paper_def(Lookup *l)
40 linewidth = 15 *CM_TO_PT; // in cm for now
41 whole_width = 8 * note_width();
43 outfile = "lelie.tex";
46 Paper_def::~Paper_def()
50 Paper_def::Paper_def(Paper_def const&s)
52 lookup_p_ = new Lookup(*s.lookup_p_);
53 geometric_ = s.geometric_;
54 whole_width = s.whole_width;
56 linewidth = s.linewidth;
60 Paper_def::set(Lookup*l)
62 assert(l != lookup_p_);
68 Paper_def::interline_f() const
70 return lookup_p_->ball(4).dim.y.length();
74 Paper_def::internote_f() const
76 return lookup_p_->internote_f();
79 Paper_def::note_width()const
81 return lookup_p_->ball(4).dim.x.length( );
84 Paper_def::standard_height() const
90 Paper_def::print() const
93 mtor << "Paper {width: " << print_dimen(linewidth);
94 mtor << "whole: " << print_dimen(whole_width);
95 mtor << "out: " <<outfile;
101 Paper_def::lookup_l()