]> git.donarmstrong.com Git - lilypond.git/blob - lily/paper-system.cc
Run `make grand-replace'.
[lilypond.git] / lily / paper-system.cc
1 /*
2   paper-system.cc -- implement Prob functions for paper-system
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 2004--2008 Jan Nieuwenhuizen <janneke@gnu.org>
7 */
8
9 #include "paper-system.hh"
10 #include "item.hh"
11
12 Prob *
13 make_paper_system (SCM immutable_init)
14 {
15   Prob *prob = new Prob (ly_symbol2scm ("paper-system"), immutable_init);
16   return prob;
17 }
18
19 void
20 paper_system_set_stencil (Prob *prob, Stencil s)
21 {
22   SCM yext = prob->get_property ("Y-extent");
23
24   if (is_number_pair (yext))
25     {
26       Box b = s.extent_box ();
27       b[Y_AXIS] = ly_scm2interval (yext);
28
29       s = Stencil (b, s.expr ());
30     }
31
32   prob->set_property ("stencil", s.smobbed_copy ());
33 }