|
From: | Han-Wen Nienhuys |
Subject: | Re: Backend and non-backend (was Re: Stencil bounding box) |
Date: | Wed, 03 May 2006 02:14:42 +0200 |
User-agent: | Thunderbird 1.5 (X11/20060313) |
David Feuer schreef:
On 5/2/06, Johannes Schindelin <address@hidden> wrote:If you have two different versions of LilyPond, the same object could be subtly moved between the two. But if you measure the area of the overlap area between old and new bbox, you have a pretty good idea how much the result deviates from the original.And if somebody wants to try a super-cool idea, that measure will not onlytell how much the output has changed, but also where to look for the largest effect.Got it. I was mostly thinking about how to match up elements that are supposed to correspond if the structure of the stencils changes even a little: for instance, if ((a b) c) becomes (a (b c)). Once the elements are matched up, we can measure the differences between them in various ways. Han-Wen's method won't necessarily notice if elements get larger (e.g., stems get longer). A more sensitive measure might use both the area of the intersection and the area of the union.
There are various ways of comparing numbers. The point is that you need to know which pairs of numbers/rectangles/etc. to compare. For that, you need to get the elements in a canonical order, and that *must* be done with discrete quantities. Some possibilities
- grob name - stencil expressions (minus numbers) - byte offset of the cause in the .ly filefor the actual distance function, there are a lot of possibilities. You'll probably need to experiment what works best.
BTW, brainwave: if we can localize the discrepancies by their bounding boxes, we could annotate the EPS files with glaring red circles that mark the differences!
-- Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen LilyPond Software Design -- Code for Music Notation http://www.lilypond-design.com
[Prev in Thread] | Current Thread | [Next in Thread] |