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

Issue 8869044: Issue 3330: redo much of the stencil stacking/spacing/empty-check (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years ago by dak
Modified:
10 years, 9 months ago
Reviewers:
Keith, janek, lemzwerg
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

Issue 3330: redo much of the stencil stacking/spacing/empty-check This contains a number of commits: Stop quite weird positioning for dots Some code here used a translation on dots that should never have had an effect but causes problems in relation to the issue 3330 fix. Use (+inf . -inf) consistently for empty stencil intervals Make Box::is_empty more selective and create an axis-specific variant Boxes are not really "empty" just because they show negative advancement on some axis. A box is empty if its original dimensions of (+inf . -inf) are still unchanged for both axes. And boxes can make an impact in one axis but not another (pretty much the definition of spacing), so is_empty can take an axis as argument now. Let Stencil::is_empty use Box::is_empty This is a change in semantics as an axis interval of '(1 . -1) is considered empty as an interval, while it is not sufficient for making a box axis empty. Things like backspaces would have similar metrics and are different from no information at all. Create Stencil::is_empty (Axis) Give ly:stencil-empty? an optional axis argument Let Box::translate ignore empty axes Rewrite Stencil::add_at_edge to treat "spacing" stencils differently A spacing stencil is one that is non-empty in its own axis, but empty in the orthogonal axis. Since they don't actually have a bounding box to convey, they don't need padding, and they don't suffer from the equality of the lower left bounding box corner with the reference point. Let Stencil::align_to abort only if the stencil is empty in the alignment axis Previously, the emptiness check was not axis specific. Let stack-lines deal properly with vertical spacing (X-empty stencils) simplify stack-stencils and rewrite stack-stencils-padding-list implement stack-stencil-line in terms of stack-stencils Let \hspace and \vspace use Y-empty and X-empty spacing, respectively Keep buildings which are empty in either axis out of skylines Issue 3330: bracketify-stencil moves grob's refpoint Also fixes parenthesize-stencil.

Patch Set 1 #

Patch Set 2 : Forgot the original fix #

Patch Set 3 : Backspacing did not work #

Total comments: 5

Patch Set 4 : And another typo #

Patch Set 5 : Fix chordname kerning #

Patch Set 6 : Yet another typo #

Total comments: 7

Patch Set 7 : Fix spacing thinkos (hopefully) #

Total comments: 5

Patch Set 8 : Quite a bit of cleanup/reorg. chord flats are still uncorrected but not relevant for review. #

Patch Set 9 : Simple fix of justify-lines. #

Total comments: 2

Patch Set 10 : Work out kinks in footnote ordering, add new "overdraw" argument to stencil-combine #

Patch Set 11 : Fix \line \vspace #3 and a few other things #

Patch Set 12 : Compatibility conversion for \vspace #

Patch Set 13 : Create Stencil::stack and tune back chord flats #

Patch Set 14 : Fix wordwrap-stencils to not get confused by spacing #

Patch Set 15 : Add mindist argument to ly:stencil-stack, fix page accounting bug #

Unified diffs Side-by-side diffs Delta from patch set Stats (+316 lines, -125 lines) Patch
M input/regression/fret-diagrams-size.ly View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -2 lines 0 comments Download
M lily/box.cc View 2 chunks +12 lines, -3 lines 0 comments Download
M lily/constrained-breaking.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +3 lines, -1 line 0 comments Download
M lily/dots.cc View 1 2 3 4 5 6 7 1 chunk +0 lines, -1 line 0 comments Download
M lily/include/box.hh View 1 chunk +1 line, -0 lines 0 comments Download
M lily/include/stencil.hh View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -0 lines 0 comments Download
M lily/skyline.cc View 3 chunks +9 lines, -5 lines 0 comments Download
M lily/stencil.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +154 lines, -20 lines 0 comments Download
M lily/stencil-scheme.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3 chunks +60 lines, -4 lines 0 comments Download
M ly/toc-init.ly View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M scm/chord-name.scm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M scm/define-markup-commands.scm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 10 chunks +33 lines, -24 lines 0 comments Download
M scm/markup.scm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +5 lines, -15 lines 0 comments Download
M scm/safe-lily.scm View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M scm/stencil.scm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +32 lines, -46 lines 0 comments Download
M scm/titling.scm View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 46
dak
Forgot the original fix
11 years ago (2013-04-28 13:16:27 UTC) #1
janek
could you put this in a branch? I strongly prefer reading git log --patch than ...
11 years ago (2013-04-28 14:50:06 UTC) #2
dak
On 2013/04/28 14:50:06, janek wrote: > could you put this in a branch? I strongly ...
11 years ago (2013-04-28 15:58:34 UTC) #3
dak
Backspacing did not work
11 years ago (2013-04-28 18:57:44 UTC) #4
Keith
You are struggling because the code recursively combines the tail of a sequence of stencils, ...
11 years ago (2013-04-28 20:04:30 UTC) #5
janek
changes i see generally LGTM (but i may be missing something, in particular Keith seems ...
11 years ago (2013-04-28 21:59:37 UTC) #6
Keith
https://codereview.appspot.com/8869044/diff/9001/scm/define-markup-commands.scm File scm/define-markup-commands.scm (right): https://codereview.appspot.com/8869044/diff/9001/scm/define-markup-commands.scm#newcode3765 scm/define-markup-commands.scm:3765: * \\translate #'(2 . 3) translate Probably this example ...
11 years ago (2013-04-28 22:16:14 UTC) #7
dak
On 2013/04/28 22:16:14, Keith wrote: > https://codereview.appspot.com/8869044/diff/9001/scm/define-markup-commands.scm > File scm/define-markup-commands.scm (right): > > https://codereview.appspot.com/8869044/diff/9001/scm/define-markup-commands.scm#newcode3765 > ...
11 years ago (2013-04-28 22:38:16 UTC) #8
dak
On 2013/04/28 21:59:37, janek wrote: > changes i see generally LGTM (but i may be ...
11 years ago (2013-04-28 23:16:28 UTC) #9
dak
Complete overhaul again, assembling stencils front to back
11 years ago (2013-04-28 23:37:57 UTC) #10
dak
Typo
11 years ago (2013-04-28 23:50:34 UTC) #11
dak
And another typo
11 years ago (2013-04-28 23:54:12 UTC) #12
dak
Fix chordname kerning
11 years ago (2013-04-29 01:07:04 UTC) #13
dak
Yet another typo
11 years ago (2013-04-29 01:24:31 UTC) #14
Keith
I worry a little about making the extent of markup different from the union of ...
11 years ago (2013-04-29 03:31:14 UTC) #15
janek
On 2013/04/29 03:31:14, Keith wrote: > I worry a little about making the extent of ...
11 years ago (2013-04-29 07:26:50 UTC) #16
janek
On 2013/04/28 23:16:28, dak wrote: > On 2013/04/28 21:59:37, janek wrote: > > changes i ...
11 years ago (2013-04-29 07:35:05 UTC) #17
Keith
On 2013/04/29 07:26:50, janek wrote: > On 2013/04/29 03:31:14, Keith wrote: > > I worry ...
11 years ago (2013-04-29 07:39:04 UTC) #18
dak
Fix spacing thinkos (hopefully)
11 years ago (2013-04-29 07:51:38 UTC) #19
dak
On 2013/04/29 07:39:04, Keith wrote: > On 2013/04/29 07:26:50, janek wrote: > > On 2013/04/29 ...
11 years ago (2013-04-29 08:10:27 UTC) #20
dak
On 2013/04/29 07:35:05, janek wrote: > On 2013/04/28 23:16:28, dak wrote: > ok, and i ...
11 years ago (2013-04-29 08:14:16 UTC) #21
Keith
The commit 'simplify stack-stencils' seems strange, and wrong in one detail. I suppose that stacking ...
11 years ago (2013-04-30 03:10:52 UTC) #22
Keith
https://codereview.appspot.com/8869044/diff/22012/scm/stencil.scm File scm/stencil.scm (right): https://codereview.appspot.com/8869044/diff/22012/scm/stencil.scm#newcode46 scm/stencil.scm:46: (lambda (tail head) On 2013/04/30 03:10:52, Keith wrote: > ...
11 years ago (2013-04-30 03:28:11 UTC) #23
dak
https://codereview.appspot.com/8869044/diff/22012/scm/stencil.scm File scm/stencil.scm (right): https://codereview.appspot.com/8869044/diff/22012/scm/stencil.scm#newcode46 scm/stencil.scm:46: (lambda (tail head) On 2013/04/30 03:10:52, Keith wrote: > ...
11 years ago (2013-04-30 05:04:24 UTC) #24
dak
On 2013/04/30 03:10:52, Keith wrote: > The commit 'simplify stack-stencils' seems strange, and wrong in ...
11 years ago (2013-04-30 06:20:02 UTC) #25
dak
Quite a bit of cleanup/reorg. chord flats are still uncorrected but not relevant for review.
10 years, 12 months ago (2013-05-01 10:31:50 UTC) #26
dak
Simple fix of justify-lines.
10 years, 12 months ago (2013-05-03 01:37:25 UTC) #27
Keith
Shucks. It gets difficult to space a list of stencils if all you have to ...
10 years, 12 months ago (2013-05-03 05:18:26 UTC) #28
lemzwerg
https://codereview.appspot.com/8869044/diff/60001/scripts/auxiliar/make-regtest-pngs.sh File scripts/auxiliar/make-regtest-pngs.sh (left): https://codereview.appspot.com/8869044/diff/60001/scripts/auxiliar/make-regtest-pngs.sh#oldcode9 scripts/auxiliar/make-regtest-pngs.sh:9: # Isn't this patch already commit c8a3b177?
10 years, 12 months ago (2013-05-03 05:49:55 UTC) #29
dak
https://codereview.appspot.com/8869044/diff/60001/scripts/auxiliar/make-regtest-pngs.sh File scripts/auxiliar/make-regtest-pngs.sh (left): https://codereview.appspot.com/8869044/diff/60001/scripts/auxiliar/make-regtest-pngs.sh#oldcode9 scripts/auxiliar/make-regtest-pngs.sh:9: # On 2013/05/03 05:49:55, lemzwerg wrote: > Isn't this ...
10 years, 12 months ago (2013-05-03 07:10:45 UTC) #30
dak
On 2013/05/03 05:18:26, Keith wrote: > Shucks. It gets difficult to space a list of ...
10 years, 12 months ago (2013-05-03 07:37:52 UTC) #31
dak
Work out kinks in footnote ordering, add new "overdraw" argument to stencil-combine
10 years, 12 months ago (2013-05-03 15:04:51 UTC) #32
dak
Fix \line \vspace #3 and a few other things
10 years, 12 months ago (2013-05-04 08:46:38 UTC) #33
dak
Compatibility conversion for \vspace
10 years, 12 months ago (2013-05-04 09:55:52 UTC) #34
Keith
On Fri, 03 May 2013 00:37:52 -0700, <dak@gnu.org> wrote: > On 2013/05/03 05:18:26, Keith wrote: ...
10 years, 12 months ago (2013-05-05 01:50:23 UTC) #35
dak
On 2013/05/05 01:50:23, Keith wrote: > If you know how to keep track of a ...
10 years, 12 months ago (2013-05-05 08:20:16 UTC) #36
Keith
On Sun, 05 May 2013 01:20:17 -0700, <dak@gnu.org> wrote: > Maintaining a "cursor position" in ...
10 years, 11 months ago (2013-05-05 16:47:49 UTC) #37
dak
"Keith OHara" <k-ohara5a5a@oco.net> writes: > On Sun, 05 May 2013 01:20:17 -0700, <dak@gnu.org> wrote: > ...
10 years, 11 months ago (2013-05-06 10:21:33 UTC) #38
Keith
On Mon, 06 May 2013 03:21:18 -0700, David Kastrup <dak@gnu.org> wrote: "Keith OHara" <k-ohara5a5a@oco.net> writes: ...
10 years, 11 months ago (2013-05-07 06:03:07 UTC) #39
dak
Please try indicating the quoting levels. This is a bit confusing otherwise. Fixing in the ...
10 years, 11 months ago (2013-05-07 09:39:00 UTC) #40
dak
Create Stencil::stack and tune back chord flats
10 years, 11 months ago (2013-05-12 19:27:39 UTC) #41
Keith
This works. I found a only couple cases on mutopiaproject that depended on the old ...
10 years, 11 months ago (2013-05-12 21:50:13 UTC) #42
dak
On 2013/05/12 21:50:13, Keith wrote: > This works. > > I found a only couple ...
10 years, 11 months ago (2013-05-12 22:10:21 UTC) #43
Keith
On Sun, 12 May 2013 15:10:21 -0700, <dak@gnu.org> wrote: > Likely. The behavior for an ...
10 years, 11 months ago (2013-05-12 23:09:00 UTC) #44
dak
Fix wordwrap-stencils to not get confused by spacing
10 years, 11 months ago (2013-05-14 07:52:14 UTC) #45
dak
10 years, 11 months ago (2013-05-23 20:16:30 UTC) #46
Add mindist argument to ly:stencil-stack, fix page accounting bug
Sign in to reply to this message.

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