You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Superstring Media <su...@gmail.com> on 2010/09/28 09:44:29 UTC
Symbol rendering options
ImageView looks like a possible way to render music symbol images but there are very many symbols that make up a musical score. I had this issue with JavaFX nodes which were very memory and performance expensive. I'm not sure how Pivot fares with this?
If ImageViews were used they could also use decorators because each symbol would be a component. Another idea that might work is what Christoper Oliver (of JavaFX fame) called "Instancing". This is where multiple ImageViews could all reference the same symbol image. For example, a score may contain many quarter notes which could use the same image. It did look like ImageView would support this concept.
Due to the many individual symbols involved in a score and the way in which they all need to be placed in relation to each other I have been leaning towards using my own layout manager and straightforward image rendering. However, maybe there are better options now?
Where in TextArea are the glyphs rendered?
Thom
Re: Symbol rendering options
Posted by Greg Brown <gk...@mac.com>.
> If ImageViews were used they could also use decorators because each symbol would be a component. Another idea that might work is what Christoper Oliver (of JavaFX fame) called "Instancing". This is where multiple ImageViews could all reference the same symbol image. For example, a score may contain many quarter notes which could use the same image. It did look like ImageView would support this concept.
Correct - a single Image instance can be referred to by multiple ImageViews.
> Due to the many individual symbols involved in a score and the way in which they all need to be placed in relation to each other I have been leaning towards using my own layout manager and straightforward image rendering. However, maybe there are better options now?
I'm definitely not an expert in musical notation, but I'd probably still start by thinking about a custom component backed by some kind of "score" model.
> Where in TextArea are the glyphs rendered?
They are laid out in TextAreaSkin#layout() and painted in TextAreaSkin#paint():
http://svn.apache.org/repos/asf/pivot/trunk/wtk/src/org/apache/pivot/wtk/skin/TextAreaSkin.java