lilypond-devel
[Top][All Lists]
Advanced

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

Re: Implements DOM-id property for grobs. (issue 5504106)


From: address@hidden
Subject: Re: Implements DOM-id property for grobs. (issue 5504106)
Date: Wed, 11 Jan 2012 13:27:03 +0100

On Jan 11, 2012, at 12:53 PM, address@hidden wrote:

> Hi Mike,
> 
> could you add some comments to the code and/or commit message explaining
> what it does?  I've read whole patch and i don't understand what happens
> here, except that it's some kind of XML identifier.
> 
> tia,
> Janek


Hey Janek,

The idea is to have a property of Grob, DOM-id, that results in the creation of 
two stencils that enclose the visual representation of the grob in a DOM node.  
These two stencils bookend all other stencils that comprise the grob.

Currently, the only DOM-friendly lilypond backend is svg.  Because a grob's 
visual representation may have more than one stencil, all of the stencils need 
to be contained in a node that has this id.  In svg speak, this is <g 
id="foo"></g>(in html it would be <div id="foo"></div>).

So, your intuition is right - all it is is an XML identifier.  Nothing actually 
"happens" as far as layout goes.  It's just useful for people who harvest data 
from DOM-friendly documents that lilypond generates to do strange things with 
music.

I'm not sure how/where to include this info in the source: if you can think of 
a good way to phrase it that would make sense to other people, I'd be happy to 
include it in the patch.

Cheers,
MS


reply via email to

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