Menu

#5319 Make skylines reflect grob rotation

Fixed
Enhancement
2018-05-12
2018-05-03
No

http://codereview.appspot.com/342060043

As has been agreed in thread http://lilypond.1069038.n5.nabble.com/Skylines-and-certain-grob-properties-rotation-extra-offset-tt212002.html, skylines should reflect the grobs' "rotation" property.

The "rotation" property (grob-interface) will be applied to the stencil after skylines have been built. Therefore, the skylines currently do not know about grob rotation and stoically stay in place.

In the example PNG file, you can see the original skylines on the left compared to the enhanced skylines on the right:

  • Hairpins now actually get "out of the way" when being rotated (vertical skylines)
  • Note the distance of the hairpin to the stave: padding is respected due to more realistic skylines.
  • TextScripts now align as they should
  • Accidentals: The two sharps now will be placed directly above and below one another because they take up less vertical space when rotated (horizontal skylines)

All the best,
Torsten

1 Attachments

Discussion

  • Torsten Hämmerle

    issue 5319: Make skylines reflect grob rotation

    modified: ../lily/include/stencil.hh
    Add parameter to skylines_from_stencil for rot (in analogy to pad)

    modified: ../lily/stencil-integral.cc

    Stencil::skylines_from_stencil
    If new rotation parameter rot is specified, use a rotated copy of
    the original stencil to build the skyline transformation matrix.
    As the rotation is rarely used, the general (non-rotated) case will
    still use the original stencil as before.

    Grob::vertical_sklyines_from_grob and Grob::horizontal_skylines_from_grob
    Read "rotation" property an pass it (SCM) to skylines_from_stencil.

    modified: ../lily/accidental.cc

    Accidental_interface::horizontal_skylines
    Read "rotation" property and pass it (SCM) to skylines_from_stencil.

    Announced in ../Documentation/changes.tely

    Documentation example slightly adapted (20° to 15°) to new skyline
    behaviour (padding will now be respected). In all affected languages:
    modified: ../Documentation/de/notation/changing-defaults.itely
    modified: ../Documentation/es/notation/changing-defaults.itely
    modified: ../Documentation/fr/notation/changing-defaults.itely
    modified: ../Documentation/it/notation/changing-defaults.itely
    modified: ../Documentation/ja/notation/changing-defaults.itely
    modified: ../Documentation/notation/changing-defaults.itely

    modified: ../input/regression/skyline-color-rotation.ly
    (20° to 15°, cf. documentation)

    new: ../input/regression/skyline-grob-rotation.ly
    New regression test.

    issue 5312: Key cancellation glyph position inconsistent

    file lily/key-signature-interface.cc

    Now using two intervals representing the "vertical skylines" of two
    adjacent natural glyphs. This makes a better model of the actual glyph
    shape than the original single point within an inverval.
    Now we can distiguish between all three cases:
    (1) no overlap -> no additional kerning needed
    (2) just touching (overlap, but intesection length 0) -> kerning 0.15
    (3) overlapping -> kerning 0.3

    Case (2) is the new one that couldn't be handled before:
    Just touching at the corners made the glyphs cling together.

    Using same interval technique as before, but I renamed the Slices from
    pos and overlap_pos to
    ht_right and last_ht_left.
    Using quarter stave-spaces as to get a better (integer) resolution.

    http://codereview.appspot.com/342060043

     
  • Torsten Hämmerle

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,3 +1,5 @@
    +http://codereview.appspot.com/342060043
    +
     As has been agreed in thread [http://lilypond.1069038.n5.nabble.com/Skylines-and-certain-grob-properties-rotation-extra-offset-tt212002.html](Thread), skylines should reflect the grobs' "rotation" property.
    
     The "rotation" property (grob-interface) will be applied to the stencil *after* skylines have been built. Therefore, the skylines currently do not know about grob rotation and stoically stay in place.
    
    • Needs: -->
    • Type: -->
     
  • Torsten Hämmerle

    New upload due to inconsistency

    http://codereview.appspot.com/342060043

     
  • Anonymous

    Anonymous - 2018-05-04
    • Needs: -->
    • Patch: new --> review
    • Type: --> Enhancement
     
  • Anonymous

    Anonymous - 2018-05-04

    Passes make, make check and a full make doc.

     
  • Anonymous

    Anonymous - 2018-05-07
    • Patch: review --> countdown
     
  • Anonymous

    Anonymous - 2018-05-07

    Patch on countdown for May 10th.

     
  • Anonymous

    Anonymous - 2018-05-10
    • Patch: countdown --> push
     
  • Anonymous

    Anonymous - 2018-05-10

    Patch counted down - please push.

     
  • Anonymous

    Anonymous - 2018-05-12
    • labels: --> Fixed_2_20_0
    • status: Started --> Fixed
    • Patch: push -->
     
  • Anonymous

    Anonymous - 2018-05-12

    Thank you Torsten,

    author  Torsten Hämmerle <torsten.haemmerle@web.de> 
        Fri, 20 Apr 2018 14:59:15 +0100 (15:59 +0200)
    committer   James Lowe <pkx166h@runbox.com> 
        Sat, 12 May 2018 12:26:27 +0100 (12:26 +0100)
    commit  72e9c4c6c313a15f934b58e00cceabc71503b06d
    
     
    • Torsten Hämmerle

      Thank you James,

      Has there been a paradigm shift or is the "Fixed_2_20_0" label just an unintended by-product of the current stable release discussion?

      Cheerio,
      Torsten

       
      • David Kastrup

        David Kastrup - 2018-05-12

        "Torsten Hämmerle" be-3@users.sourceforge.net writes:

        Thank you James,

        Has there been a paradigm shift or is the "Fixed_2_20_0" label just an
        unintended by-product of the current stable release discussion?

        Just a confusion I'd say. Definitely not going to be in 2.20.

        --
        David Kastrup

         
        • Torsten Hämmerle

          OK, thanks, fair enough, that's why it asked.
          Set to "Fixed_2_21_0".

           
  • Torsten Hämmerle

    • labels: Fixed_2_20_0 --> Fixed_2_21_0