From f7e8b56381f0c2638868b7662f985f872093673e Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 26 Mar 2002 21:49:03 +0000 Subject: [PATCH] lilypond-1.1.39 --- lily/include/molecule.hh | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/lily/include/molecule.hh b/lily/include/molecule.hh index 5727661321..90102b6242 100644 --- a/lily/include/molecule.hh +++ b/lily/include/molecule.hh @@ -12,13 +12,20 @@ #include "box.hh" #include "axes.hh" #include "direction.hh" -#include "protected-scm.hh" #include "cons.hh" //#define ATOM_SMOB /** a group of individually translated symbols. You can add molecules - to the top, to the right, etc. */ + to the top, to the right, etc. + + Dimension behavior: + + Empty molecules have empty dimensions. If add_at_edge is used to + init the molecule, we assume that + DIMENSIONS = (Interval(0,0),Interval(0,0) + +*/ class Molecule { #ifdef ATOM_SMOB SCM atom_list_; @@ -27,20 +34,34 @@ class Molecule { Cons *atom_list_; #endif friend class Paper_outputter; + public: Box dim_; Molecule(); ~Molecule(); - void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding); + /** + Set dimensions to empty, or to (Interval(0,0),Interval(0,0) */ + void set_empty (bool); + void add_at_edge (Axis a, Direction d, const Molecule &m, Real padding); + void add_atom (Atom const *a); void add_molecule (Molecule const &m); void translate (Offset); - void do_center (Axis); + + /** + align D direction in axis A. + + If D == CENTER, then move the dimension(A).center() to (0,0) + + Else, move so dimension(A)[D] == 0.0 + + */ + void align_to (Axis a, Direction d); void translate_axis (Real,Axis); + - void add_atom (Atom const *a); /// how big is #this#? Box extent() const; Interval extent (Axis) const; -- 2.39.5