2 molecule.cc -- implement Molecule
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
12 #include "molecule.hh"
18 Molecule::TeX_string() const
21 for (iter_top (ats,c); c.ok(); c++)
27 Molecule::extent() const
30 for (iter_top (ats,c); c.ok(); c++)
31 b.unite (c->extent());
36 Molecule::translate (Offset o)
38 for (iter_top (ats,c); c.ok(); c++)
43 Molecule::translate (Real x,Axis a)
45 for (iter_top (ats,c); c.ok(); c++)
50 Molecule::add (Molecule const &m)
52 for (iter_top (m.ats,c); c.ok(); c++)
60 Molecule::add_at_edge (Axis a, Direction d, Molecule const &m)
67 Real offset = extent ()[a][d] - m.extent ()[a][-d];
69 toadd.translate (offset, a);
76 Molecule::operator = (Molecule const &)
81 Molecule::Molecule (Molecule const &s)
87 Molecule::print() const
92 for (iter_top (ats,c); c.ok(); c++)
98 Molecule::add (Atom const &a)
100 ats.bottom().add (new Atom (a));