lilypond-devel
[Top][All Lists]
Advanced

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

Re: add stencil-whiteout-outline function (issue 236480043 by address@hi


From: paulwmorris
Subject: Re: add stencil-whiteout-outline function (issue 236480043 by address@hidden)
Date: Mon, 01 Jun 2015 15:59:20 +0000


https://codereview.appspot.com/236480043/diff/20001/Documentation/notation/rhythms.itely
File Documentation/notation/rhythms.itely (right):

https://codereview.appspot.com/236480043/diff/20001/Documentation/notation/rhythms.itely#newcode555
Documentation/notation/rhythms.itely:555: collide with other objects in
a staff.
On 2015/05/31 01:07:46, Keith wrote:
At first I thought the docs should use the new outline form of
whiteout, but
here I see that the box is perfect for this case.

(The text should say ".. properties of objects that should cause a gap
in ties."
  Later we might build this into the grob definitions.)

Ok, I'll make that change to the text.

https://codereview.appspot.com/236480043/diff/20001/lily/grob.cc
File lily/grob.cc (right):

https://codereview.appspot.com/236480043/diff/20001/lily/grob.cc#newcode162
lily/grob.cc:162:
On 2015/05/31 01:07:46, Keith wrote:
We could let  \override Xx.whiteout = 3
give a white outline 3 times the staffline thickness, by looking up
the
staffline thickness here.
if scm_is_number(get_property("whiteout") {
   SCM wh_proc = y_lily_module_constant ("stencil-whiteout-outline");
   Real thickness = robust_scm2double (get_property("whiteout"), 3.0)
        * layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
   retval = *unsmob<Stencil>( scm_call_2(wh_proc,
                                        retval.smobbed_copy,
                                        thickness));
}

Ok, thanks for this code.  I'll work it into the next patch set.

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

https://codereview.appspot.com/236480043/diff/20001/scm/define-markup-commands.scm#newcode722
scm/define-markup-commands.scm:722: (stencil-whiteout (interpret-markup
layout props arg)))
On 2015/05/31 01:07:47, Keith wrote:
Whatever the name for \whiteout-outline  you can let it read the
'thickness'
property, to use the interface for optional arguments that we have in
the markup
language
  g^\markup \override #'(thickness . 5) \whiteout-outline "hello"

(define-markup-command (whiteout-outline layout props arg)
   (markup?)
   #:category other
   #:properties ((thickness 4))
   (stencil-whiteout-outline
      (interpret-markup layout props arg)
       (* thickness
          (ly:output-def-lookup layout 'line-thickness))))

Sounds good.  Thanks for the code to do this.

https://codereview.appspot.com/236480043/



reply via email to

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