From d8ea073a47683e045ce6bf6b7cca09a31f46d806 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:41:17 +0000 Subject: [PATCH] lilypond-0.0.31 --- hdr/paper.hh | 41 ------------------------- src/paper.cc | 86 ---------------------------------------------------- 2 files changed, 127 deletions(-) delete mode 100644 hdr/paper.hh delete mode 100644 src/paper.cc diff --git a/hdr/paper.hh b/hdr/paper.hh deleted file mode 100644 index da9ebd12ed..0000000000 --- a/hdr/paper.hh +++ /dev/null @@ -1,41 +0,0 @@ -#include "proto.hh" -#include "real.hh" -#include "string.hh" -#include "moment.hh" - - -/** symbols, dimensions and constants - - This struct takes care of all kinds of symbols, dimensions and - constants. Most of them are related to the point-size of the fonts, - so therefore, the lookup table for symbols is also in here. - - see TODO - */ -struct Paperdef { - Lookup *lookup_p_; - String outfile; - - Real linewidth; - - /// how much space does a whole note take (ideally?) - Real whole_width; - - /// ideal = geometric_ ^ log2(duration) - Real geometric_; - - /* *************** */ - void reinit(); - Paperdef(Lookup*); - void set(Lookup*); - ~Paperdef(); - Paperdef(Paperdef const&); - Real interline()const; - Real internote()const; - Real rule_thickness()const; - Real standard_height()const; - Real note_width() const; - void print() const; - Real duration_to_dist(Moment); -}; - diff --git a/src/paper.cc b/src/paper.cc deleted file mode 100644 index ec5fde415d..0000000000 --- a/src/paper.cc +++ /dev/null @@ -1,86 +0,0 @@ -#include -#include "misc.hh" -#include "paper.hh" -#include "debug.hh" -#include "lookup.hh" -#include "dimen.hh" - - - -// golden ratio -const Real PHI = (1+sqrt(5))/2; - -// see Roelofs, p. 57 -Real -Paperdef::duration_to_dist(Moment d) -{ - return whole_width * pow(geometric_, log_2(d)); -} - -Real -Paperdef::rule_thickness()const -{ - return 0.4 PT; -} - -Paperdef::Paperdef(Lookup *l) -{ - lookup_p_ = l; - linewidth = 15 *CM_TO_PT; // in cm for now - whole_width = 8 * note_width(); - geometric_ = sqrt(2); -} - -Paperdef::~Paperdef() -{ - delete lookup_p_; -} -Paperdef::Paperdef(Paperdef const&s) -{ - lookup_p_ = new Lookup(*s.lookup_p_); - geometric_ = s.geometric_; - whole_width = s.whole_width; - outfile = s.outfile; - linewidth = s.linewidth; -} - -void -Paperdef::set(Lookup*l) -{ - assert(l != lookup_p_); - delete lookup_p_; - lookup_p_ = l; -} - -Real -Paperdef::interline() const -{ - return lookup_p_->ball(4).dim.y.length(); -} - -Real -Paperdef::internote() const -{ - return lookup_p_->internote(); -} -Real -Paperdef::note_width()const -{ - return lookup_p_->ball(4).dim.x.length( ); -} -Real -Paperdef::standard_height() const -{ - return 20 PT; -} - -void -Paperdef::print() const -{ -#ifndef NPRINT - mtor << "Paper {width: " << print_dimen(linewidth); - mtor << "whole: " << print_dimen(whole_width); - mtor << "out: " <