Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(5755)

Issue 104085: Implement new handling for margin and line-width settings.

Can't Edit
Can't Publish+Mail
Start Review
Created:
14 years, 8 months ago by xmichael-k
Modified:
14 years, 8 months ago
Reviewers:
joeneeman
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Implement new handling for margin and line-width settings. Make default left- and right-margins accessible in paper-defaults-init.ly. Look whether line-width, left-margin and/or right-margin are set, calculate missing values and check if systems would run off the page. Set default values in such cases.

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+117 lines, -28 lines) Patch
M lily/include/output-def.hh View 1 chunk +2 lines, -1 line 0 comments Download
M lily/output-def.cc View 2 chunks +78 lines, -0 lines 3 comments Download
M lily/output-def-scheme.cc View 1 chunk +13 lines, -0 lines 0 comments Download
M ly/paper-defaults-init.ly View 1 chunk +4 lines, -0 lines 0 comments Download
M scm/framework-ps.scm View 1 chunk +7 lines, -5 lines 0 comments Download
M scm/page.scm View 1 chunk +6 lines, -9 lines 0 comments Download
M scm/paper.scm View 1 chunk +4 lines, -10 lines 0 comments Download
M scm/titling.scm View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 1
joeneeman
14 years, 8 months ago (2009-08-12 04:06:52 UTC) #1
Could you add some regression tests (doesn't have to be in this commit) that
demonstrate some of the possible combinations of margin settings? There should
also be some tests that demonstrate the warnings.

http://codereview.appspot.com/104085/diff/1/4
File lily/output-def.cc (right):

http://codereview.appspot.com/104085/diff/1/4#newcode149
Line 149: if ((lookup_variable (ly_symbol2scm ("is-layout")) == SCM_BOOL_T) &&
(scm_line_width != SCM_UNDEFINED)) return;
put the return on a separate line

http://codereview.appspot.com/104085/diff/1/4#newcode183
Line 183: if (paper_width != (line_width + left_margin + right_margin))
In case there is rounding, it is better to check
if (abs (paper_width - line_width - left_margin - right_margin) > 1e-6)

http://codereview.appspot.com/104085/diff/1/4#newcode205
Line 205: scm_from_double(paper_width - left_margin_default -
right_margin_default));
indentation
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b