Skip to content

Commit

Permalink
add support for loc on nc
Browse files Browse the repository at this point in the history
  • Loading branch information
rettinghaus committed Oct 20, 2023
1 parent 545f379 commit f2b0774
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/view_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,15 +238,19 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
rotateOffset = 0;
}

if (clef->GetShape() == CLEFSHAPE_C) {
pitchOffset = (nc->GetPname() - 1) * (staffSize / 2);
if (nc->HasLoc()) {
yValue = noteY + (nc->GetLoc() - 2 * (staffLineNumber - 1)) * (staffSize / 2);
}
else if (clef->GetShape() == CLEFSHAPE_F) {
pitchOffset = (nc->GetPname() - 4) * (staffSize / 2);
else {
if (clef->GetShape() == CLEFSHAPE_C) {
pitchOffset = (nc->GetPname() - 1) * (staffSize / 2);
}
else if (clef->GetShape() == CLEFSHAPE_F) {
pitchOffset = (nc->GetPname() - 4) * (staffSize / 2);
}
yValue = clefYPosition + pitchOffset + octaveOffset - rotateOffset;
}

yValue = clefYPosition + pitchOffset + octaveOffset - rotateOffset;

for (auto it = params.begin(); it != params.end(); it++) {
if (nc->GetCurve() == curvatureDirection_CURVE_a || nc->GetCurve() == curvatureDirection_CURVE_c) {
for (int i = 0; i < static_cast<int>(sizeof(params.at(0).fontNoLiq)); i++) {
Expand Down

0 comments on commit f2b0774

Please sign in to comment.