Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Baseline of each staff #384

Closed
cecilios opened this issue Oct 29, 2022 · 5 comments
Closed

Baseline of each staff #384

cecilios opened this issue Oct 29, 2022 · 5 comments

Comments

@cecilios
Copy link
Member

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
Copy link
Member Author

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
Copy link
Member Author

cecilios commented Nov 9, 2022

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

@npiegdon
Copy link

npiegdon commented Nov 9, 2022

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

@cecilios
Copy link
Member Author

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

@cecilios
Copy link
Member Author

cecilios commented Jun 1, 2024

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

@cecilios cecilios closed this as completed Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants