-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
factor hook offset into stem slash calculations #19559
Conversation
Tested on Mac OS 11.6.5, Ubuntu 20.04.6, Windows 11 |
@@ -4821,7 +4821,7 @@ static void layoutStemSlash(const StemSlash* item, const LayoutContext& ctx, Ste | |||
&& (musicFont == "Bravura" || musicFont == "Finale Maestro" || musicFont == "Gonville")) { | |||
angle *= angleIncrease; | |||
} | |||
endX = hook->layoutData()->bbox().translated(hook->pos()).right(); // always ends at the right bbox margin of the hook | |||
endX = hook->layoutData()->bbox().translated(hook->pos()).right() - hook->offset().x(); // always ends at the right bbox margin of the hook |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it would be better to replace hook->pos()
with hook->layoutData()->pos()
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah yes - I hadn't noticed that hook->pos()
included the offset, thanks!
90071f7
to
f246bf1
Compare
Is this waiting approval from @mike-spa or is it ready to merge? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
f246bf1
to
4843854
Compare
(rebased, because of layoutData/ldata conflict) Will merge after the checks pass! |
Resolves: #19481