<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Jari,<br>
    <br>
    from time to time I get wrong results when calculating the metrics
    of slur endpoints.<br>
    For example in this case:<br>
    <img src="cid:part1.A8031ABF.160CB833@angermueller.com" alt=""><br>
    The bottom of the last note is exactly <b>12 </b>EVPU vertically
    away from the slur endpoint y (i.e. half a staff line distance) - as
    it is set in the Slur Placements Prefs.<br>
    But when I calculate the bottom of the note I get (for example) 2602
    EVPU and the slur endpoint equals 2583 EVPU, resulting in a
    difference of <b>19 </b>EVPU.<br>
    When I calculate the BottomStaffLinePos I get 2588 EVPU (which is
    correct compared to the bottom of the note, but not compared to the
    slur). <br>
    So although the slur visually ends in the middle of the staff line,
    it returns a value of 5 EVPU below the staffline.<br>
    <br>
    A workaround would be a "consistency check":<br>
    check what sort of "Slur Placement" is used and estimate where the
    slur should end according to the "Slur Placement" settings.<br>
    If this is different, then use the estimated value instead of what
    JW Lua returns.<br>
    The only problem is that the Slur Placement settings are not
    implemented at the moment and there is also no method that tells me
    which "Slur Placement" type is used, so they would need to be
    hard-coded).<br>
    <br>
    In my tests the slur metrics deviated by up to 8 EVPU from what I
    measured with other metrics (like notes or staff lines).<br>
    I tested many different scores.<br>
    <br>
    Any idea ?<br>
    <br>
    Jan<br>
  </body>
</html>