lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue 3330: redo much of the stencil stacking/spacing/empty-check (i


From: k-ohara5a5a
Subject: Re: Issue 3330: redo much of the stencil stacking/spacing/empty-check (issue 8869044)
Date: Mon, 29 Apr 2013 03:31:14 +0000

I worry a little about making the extent of markup different from the
union of its components.  Someone may have used  c4^\markup{\hspace #-3
"text"}  and the left side of the "text" is now vulnerable to
collisions.

The alternative is to use a variable to remember the cursor position in
a loop that assembles a line of markup.

In patch-set "yet another typo" the extent of the markup
assembled-so-far is used to record that cursor position, but in \markup
{"_pple" \hspace#-6.5 "A"} the you really don't want the markup extent
to end the cursor position, after the "A", because the "pple" extends
farther right.

On 2013/04/28 22:38:16, dak wrote:
On 2013/04/28 22:16:14, Keith wrote:

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 should place the translated markup relative to
music,
> rather than in a line of \markup; otherwise, someone might
experiment with
> this and conclude that \translate cannot move things to the left.

Well, the example works, and I'd like to avoid meddling with it right
now

The example might not work after your patch.
\translate #(x . y) moves the stencil relative to its reference point,
but the extents go with the stencil.  If you space a line of markup
based on extents (not reference points) then these examples with
\translate #(x . y) in a line of markup will show no visible effect of
the x.


https://codereview.appspot.com/8869044/diff/27001/lily/stencil.cc
File lily/stencil.cc (right):

https://codereview.appspot.com/8869044/diff/27001/lily/stencil.cc#newcode257
lily/stencil.cc:257: bool separate = !is_empty (other_axis (a)) &&
!s.is_empty (other_axis (a));
suggest  separate =>  !special_spacing

https://codereview.appspot.com/8869044/diff/27001/lily/stencil.cc#newcode266
lily/stencil.cc:266: // determined by their respective stencils to allow
for spacing
This is where the magic happens, so good to have some search-words in
the comment.

// If either stencil has special spacing, such as \hspace#3,
// use the individual stencil extents for the corresponding
// limit of the resulting extent, to allow \hspace#-3 to backspace

https://codereview.appspot.com/8869044/diff/27001/scm/define-markup-commands.scm
File scm/define-markup-commands.scm (right):

https://codereview.appspot.com/8869044/diff/27001/scm/define-markup-commands.scm#newcode3765
scm/define-markup-commands.scm:3765: * \\translate #'(2 . 3) translate
might fail

https://codereview.appspot.com/8869044/diff/27001/scm/define-markup-commands.scm#newcode3767
scm/define-markup-commands.scm:3767: * \\translate-scaled #'(2 . 3)
translate-scaled
might fail

https://codereview.appspot.com/8869044/diff/27001/scm/define-markup-commands.scm#newcode3898
scm/define-markup-commands.scm:3898: Translate @var{arg} relative to its
surroundings.  @var{offset}
might become "... relative to its alignment point."

https://codereview.appspot.com/8869044/diff/27001/scm/define-markup-commands.scm#newcode3904
scm/define-markup-commands.scm:3904: \\translate #'(2 . 3)
might fail

https://codereview.appspot.com/8869044/diff/27001/scm/markup.scm
File scm/markup.scm (right):

https://codereview.appspot.com/8869044/diff/27001/scm/markup.scm#newcode69
scm/markup.scm:69: @var{space} before them and don't avoid overlapping
other stencils."
The last sentence of this comment should go with its implementation in
stencil.cc

https://codereview.appspot.com/8869044/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]