[jmsl] change color of Note / acceidental / ledger lines / etc.?
jmsl at music.columbia.edu
jmsl at music.columbia.edu
Tue Feb 20 10:40:34 EST 2007
Hi all,
I'm trying to change the color of a Notehead on a JMSL score, and I
can't find a reasonable way to make it happen.
Here's the hack I've made:
* I override the render method in the Note class so that the note
doesn't get rendered by JMSL.
* I manually render the note onto the score image.
Here is the problem with this hack:
* The accidentals and ledger lines are still drawn in black.
* It therefore looks ugly and is difficult to read.
I could, of course, not create a Note object at all and manually draw
the notehead, ledger lines, and accidentals. But at that point, I'd
basically be reimplimenting all of the JMSL JScore rendering myself,
which I really hope not to do.
I tried one other solution, but it didn't work:
* I override the render method in the Note class.
* render calls g.setColor(color) and then calls the super.render.
Thanks in advance for any advice.
Best,
Jason Freeman
Assistant Professor
Music Department
Georgia Institute of Technology
http://www.jasonfreeman.net
More information about the jmsl
mailing list