Re: [frogs] Changing subproperties with grob-set-property (working on bug #40) |
[ Thread Index |
Date Index
| More lilynet.net/frogs Archives
]
- To: frogs@xxxxxxxxxxx
- Subject: Re: [frogs] Changing subproperties with grob-set-property (working on bug #40)
- From: Marc Hohl <marc@xxxxxxxxxx>
- Date: Sat, 31 Oct 2009 21:32:14 +0100
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; t=1257021135; l=1710; s=domk; d=hohlart.de; h=Content-Transfer-Encoding:Content-Type:In-Reply-To:References: Subject:To:MIME-Version:From:Date:X-RZG-CLASS-ID:X-RZG-AUTH; bh=gu5+6uMCGaWeapOBIMWJYOcpYu8=; b=W+MZ/Jx/TqNZVXgv1M/vnOrteY1lxKQm0tjDU+t/MMgeBS2LXy0Uilb19R/ILJluej/ SFJCzPD767OtR8L8X6XD5v/be7gTBmSMPqiZ/2zEOnjLO7jtOfM/AHiCt4JtWur0wDOzr 1sVVpjaSnqu5bEuYnBb2NoDPJLnAJqjIzGc=
Neil Puttock schrieb:
2009/10/31 Marc Hohl <marc@xxxxxxxxxx>:
The syntax
(ly:grob-set-property! grob '(bound-details right X) right-X)
won't work, however. How can I put the new value into the list?
You'll have to do some C++ hacking. There are two options here (see
the code in grob-scheme.cc):
1) amend ly_grob_set_property_x () to allow lists
2) create a new exported function ly_grob_set_nested_property_x ()
I favour the latter, since it's cleaner to implement: if you amend
ly:grob-set-property! you'll have to use a hybrid type check, since
the property path could be either a symbol or list.
Ok, I will have a look at the code. I am sure that questions will arise,
because c++ is new for me, but nevertheless ...
Or is my approach aiming in the wrong direction?
I think it's fine for a tweak, but a better fix would involve working
directly on the code in line-spanner.cc.
Hm, probably.
(set! right-X (- right-X 30)))
You could get a compensatory value automatically by using
ly:grob-extent on the accidental.
Yes, the value was simply a quick test to see whether
my approach will work as I expected, but I didn't work
on the grob-extent, because ly:grob-set-property! failed.
Whatever you decide to do, allowing nested properties in
ly:grob-set-property! would be a useful enhancement.
So I concentrate on this, try to solve it and afterwards come back to
the initial
problem. If I follow proposal 2, there will be a
ly:grob-set-nested-property!
function, am I right?
Thanks for your reply!
Marc
Regards,
Neil
---
----
Join the Frogs!
---
----
Join the Frogs!