X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-breaking.cc;h=88f55b896c79b4868fd6b4e8ba8f8a59e7973457;hb=02ecfc59e4e77633139ba19d9cf45701d17fac40;hp=4ac005461c68d66a5e187b8f58138c7a371423f0;hpb=5e040cd922e5cdae777d3a8a16fc9dd80d24a6ef;p=lilypond.git diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index 4ac005461c..88f55b896c 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -177,6 +177,7 @@ Page_breaking::Page_breaking (Paper_book *pb, Break_predicate is_break, Prob_bre { book_ = pb; system_count_ = 0; + paper_height_ = robust_scm2double (pb->paper_->c_variable ("paper-height"), 1.0); ragged_ = to_boolean (pb->paper_->c_variable ("ragged-bottom")); ragged_last_ = to_boolean (pb->paper_->c_variable ("ragged-last-bottom")); systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("systems-per-page"), 0)); @@ -365,6 +366,15 @@ Page_breaking::make_page (int page_num, bool last) const SCM_UNDEFINED)); } +// Returns the total height of the paper, including margins and +// space for the header/footer. This is an upper bound on +// page_height, and it doesn't depend on the current page. +Real +Page_breaking::paper_height () const +{ + return paper_height_; +} + Real Page_breaking::page_height (int page_num, bool last) const {