[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fixes bad slur heights by limiting fit_factor to the interior of slu
From: |
mtsolo |
Subject: |
Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072) |
Date: |
Fri, 05 Aug 2011 09:03:32 +0000 |
On 2011/08/05 01:50:15, hanwenn wrote:
LGTM
On Thu, Aug 4, 2011 at 9:20 PM, <mailto:address@hidden> wrote:
> Instead of defining the middle of curve in terms of curve length, I
use
> a constant number here. It seems to do the trick better than a
variable
> length.
8fdea86edb73b0a1fb4829e0a4fcf39932828a8f..083fc5935df3b626ea9a13a7207354f8497a13a2
> 100644
> --- a/lily/slur-configuration.cc
> +++ b/lily/slur-configuration.cc
> @@ -95,7 +95,10 @@ fit_factor (Offset dz_unit, Offset dz_perp,
> Real eps = 0.01;
> Interval pext = eps * Interval (-1, 1) +
p[X_AXIS];
> pext.intersect (curve_xext);
> - if (pext.is_empty () || pext.length () <=
1.999 * eps)
> + if ((pext.is_empty ()
> + || pext.length () <= 1.999 * eps
> + || (p[X_AXIS] -
curve_xext[LEFT]) < 2.5
> + || (curve_xext[RIGHT] -
p[X_AXIS]) < 2.5))
Basic logic seems sane. You may adopt a todo to make the 2.5
parameterized; whether or not the point is 'far' from the edge depends
on the shape and length of the curve, so it could theoretically be
calculated from a scale-free parameter.
Two requests:
* add a bool close_to_edge to make the condition easier to read.
* add a parameter rather than hardcoding. I know we have too many
parameters, but given that this uses an arbitrary number 2.5, it's
better to have that number together with other numbers.
--
Han-Wen Nienhuys - mailto:address@hidden -
http://www.xs4all.nl/%7Ehanwen
New patch w/ Han-Wen's suggestions & a regtest online.
http://codereview.appspot.com/4810072/
- Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), mtsolo, 2011/08/04
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072),
mtsolo <=
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), hanwenn, 2011/08/05
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), mtsolo, 2011/08/05
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), k-ohara5a5a, 2011/08/06
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), lemniskata . bernoullego, 2011/08/06
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), address@hidden, 2011/08/06
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), Janek Warchoł, 2011/08/07
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), address@hidden, 2011/08/07
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), Janek Warchoł, 2011/08/07
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), Graham Percival, 2011/08/07
- Re: Fixes bad slur heights by limiting fit_factor to the interior of slurs. (issue4810072), Han-Wen Nienhuys, 2011/08/08