lomse icon indicating copy to clipboard operation
lomse copied to clipboard

Baseline of each staff

Open cecilios opened this issue 3 years ago • 4 comments

The last question I find in discussion #377 is about how to get the baseline (or some other anchor point) of each staff in the system.

Opening this issue as a remainder to answer this question.

cecilios avatar Oct 29 '22 08:10 cecilios

A simple way to get this information is by asking GmoBoxSystem for the staff shapes, and then requesting the staff bounding box (or its origin):

GmoBoxSystem* pSystem = ...
GmoShapeStaff* pStaff = pSystem->get_staff_shape(int iInstr, int iStaff);
UPoint origin = pStaff->get_origin()

As always, origin is relative to GmoBoxPage origin. But as FreeFlowView has only one page with origin at (0, 0), the returned staff origin can be used as absolute coordinates for FreeFlowView.

cecilios avatar Oct 29 '22 16:10 cecilios

@npiegdon Did the answer solved your needs? Can I close this issue?

cecilios avatar Nov 09 '22 09:11 cecilios

Yes, this should be perfect, thanks! (And I am hoping to have a chance to confirm that, starting in just a couple weeks.)

npiegdon avatar Nov 09 '22 20:11 npiegdon

No problem. I'll keep it open until you can test and confirm.

cecilios avatar Nov 10 '22 08:11 cecilios

I am closing this issue due to lack of any feedback. So I assume the issue is solved

cecilios avatar Jun 01 '24 09:06 cecilios