Docs: LM 4.4.3: Clarify overriding vertical positioning of spanners
[lilypond/mpolesky.git] / lily / paper-system.cc
blob6653b6ddc7deb9e60582752206eda332470d27f2
1 /*
2 paper-system.cc -- implement Prob functions for paper-system
4 source file of the GNU LilyPond music typesetter
6 (c) 2004--2009 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
9 #include "paper-system.hh"
10 #include "item.hh"
12 Prob *
13 make_paper_system (SCM immutable_init)
15 Prob *prob = new Prob (ly_symbol2scm ("paper-system"), immutable_init);
16 return prob;
19 void
20 paper_system_set_stencil (Prob *prob, Stencil s)
22 SCM yext = prob->get_property ("Y-extent");
24 if (is_number_pair (yext))
26 Box b = s.extent_box ();
27 b[Y_AXIS] = ly_scm2interval (yext);
29 s = Stencil (b, s.expr ());
32 prob->set_property ("stencil", s.smobbed_copy ());