GSoC : Week 4
Hello,
This week I made a PR with the implementation of the basic text annotation. Here is the link :
https://github.com/musescore/MuseScore/pull/2666
There are a few commits within the PR which correspond to different "versions" of the implementation.
The first version creates a staff text and just uses a different style for an annotation to distinguish it from a staff text. However, the goal was to have a new element for annotation.
This is done in the latest commit.
There were two possibilities for the annotation class as to which class to inherit from, in the sense; either there is no base class, but two separate classes, one for text annotation and one for graphical annotation. I tried this approach and this made it simpler to implement text annotation.
However, due to some common functionality of the two types of annotation (for example show/hide all annotations at once which also applies on print) ; both types are not being kept separate, but the type is a member for annotation, and annotation inherits from Element.
The current PR is based on this model, and successfully creates a new element Annotation. However, this model makes layout and draw for the annotation a bit tricky, and I am facing a problem with the same.
This should work on making a few minor changes. We also came up with some design ideas that need to be investigated further :
- A possibility of making use of the existing Layer/Tag mechanism and make all the annotations land on a single layer / text annotations land on one and graphical annotations on another. (In the latter case, we could as well have two separate classes)
- Possibility of creation of annotations from a single palette / toolbar
- A separate "Annotation mode"
The coming week I plan to finish the implementation for the text annotation, and consolidate the design of the other types, whether the Layer/Tag mechanism is going to be employed or not, and so on, and initiate the implementation of other annotation types.
Stay tuned!
Comments
I believe the last (and still open) PR in the series of PRs following the one mentioned above is https://github.com/musescore/MuseScore/pull/2810