Closed cecilios closed 1 year ago
Those look perfect. Thanks for coming up with this and for the additional documentation on the graphical model!
Again, I think my only question is how do I determine how high iSystem can go? Could we just keep incrementing it until a null GmoBoxSystem comes back?
Hoops! I have detected an error in method GraphicModel::get_system_box(int iSystem)
: although its signature was in lomse_graphical_model.h
and, thus, I documented it, this method was never implemented!
PR #381 implements this method as well as a new method for getting the number of systems in the score.
Please note that an additional parameter socoreId
was added, as a document can contain many scores and then it is necessary to specify to which score is the request referring to. So, in the examples, replace
GmoBoxSystem* pBoxSystem = pGM->get_system_box(iSystem); //iSystem=0..n-1
by
GmoBoxSystem* pBoxSystem = pGM->get_system_box(iSystem, scoreId); //iSystem=0..n-1
how do I determine how high iSystem can go? Could we just keep incrementing it until a null GmoBoxSystem comes back?
Apart from new method GraphicModel::get_num_systems(ImoId scoreId)
it is also possible just keep incrementing iSystem
until you get a nullptr
.
I am closing this issue as there is no further feedback, so it appears to be resolved. If you believe things are still unresolved please let me know and I can reopen if needed.
In discussion #377 it was mentioned the need to:
To determine the coordinates for a system it is enough to access the graphical model and get the sytem box for the desired system. A simple way of doing this would be:
The system origin is relative to page origin but for
FreeFlowView
, as it is only one page, the point will be absolute logical units as page origin is always at (0, 0).And to determine the height of a system use any of these methods:
Let me know if this solves your needs