2 paper-system.cc -- implement Paper_system
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2006 Jan Nieuwenhuizen <janneke@gnu.org>
9 #include "paper-system.hh"
12 Paper_system::Paper_system (Stencil s, SCM immutable_init)
13 : Prob (immutable_init)
15 SCM yext = get_property ("Y-extent");
17 if (is_number_pair (yext))
20 Box b = s.extent_box();
21 b[Y_AXIS] = ly_scm2interval (yext);
23 s = Stencil (b, s.expr ());
26 set_property ("stencil", s.smobbed_copy ());
30 unsmob_paper_system (SCM x)
32 Prob *prob = unsmob_prob (x);
33 return dynamic_cast<Paper_system*> (prob);
36 LY_DEFINE(ly_paper_system_p, "ly:paper-system?",
40 return scm_from_bool (unsmob_paper_system (obj));