#include "system.hh"
#include "main.hh"
#include "paper-column.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
#include "paper-outputter.hh"
#include "paper-score.hh"
#include "string.hh"
}
g->suicide ();
}
- else if (g->live ())
+ else if (g->is_live ())
g->do_break_processing ();
}
progress_indication (_f ("Element count %d.", count + element_count ()));
int line_count = broken_intos_.size ();
- SCM lines = scm_c_make_vector (line_count, SCM_UNDEFINED);
+ SCM lines = scm_c_make_vector (line_count, SCM_EOL);
- for (int i = 0; i < line_count; i++)
+ for (int i = 0; i < line_count; i++)
{
if (verbose_global_b)
progress_indication ("[");
if (verbose_global_b)
progress_indication (to_string (i) + "]");
}
- return lines;
+ return lines;
}
/* Find the loose columns in POSNS, and drape them around the columns
Start with layer 3, since scm_cons prepends to list. */
SCM all = get_property ("all-elements");
- Real penalty = 0;
+ SCM exprs = SCM_EOL;
+ SCM *tail = &exprs;
+
for (int i = LAYER_COUNT; i--;)
for (SCM s = all; ly_c_pair_p (s); s = ly_cdr (s))
{
/* Must copy the stencil, for we cannot change the stencil
cached in G. */
- SCM my_stencil = stil->smobbed_copy ();
- unsmob_stencil (my_stencil)->translate (o + extra);
- stencils = scm_cons (my_stencil, stencils);
-
- if (g->original_)
- {
- if (Item *it = dynamic_cast <Item*> (g))
- {
- Grob *col = it->get_column ();
- SCM s = col->get_property ("page-penalty");
- // FIXME; page breaking is not discrete at +-10000
- if (ly_c_number_p (s)) // && fabs (ly_scm2double (s)) < 10000)
- penalty += ly_scm2double (s);
- }
- }
+
+ Stencil st = *stil;
+ st.translate (o + extra);
+ *tail = scm_cons (st.expr (), SCM_EOL);
+ tail = SCM_CDRLOC(*tail);
+
}
+
+
Interval x (extent (this, X_AXIS));
Interval y (extent (this, Y_AXIS));
- Paper_line *pl = new Paper_line (Offset (x.length (), y.length ()),
- stencils, (bool) penalty); // FIXME.
+ Stencil sys_stencil (Box (x,y),
+ scm_cons (ly_symbol2scm ("combine-stencil"),
+ exprs));
+
+ Paper_line *pl = new Paper_line (sys_stencil, false);
+
+
+ Item * break_point =this->get_bound(LEFT);
+ pl->penalty_ =
+ robust_scm2double (break_point->get_property ("page-penalty"), 0.0);
+
return scm_gc_unprotect_object (pl->self_scm ());
}