From f2b0774344097ea7c630ce5e92cd133cf33081e7 Mon Sep 17 00:00:00 2001 From: Klaus Rettinghaus Date: Fri, 20 Oct 2023 14:13:29 +0200 Subject: [PATCH] add support for loc on nc --- src/view_neume.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/view_neume.cpp b/src/view_neume.cpp index 56abc2774d3..cbdf0b8c624 100644 --- a/src/view_neume.cpp +++ b/src/view_neume.cpp @@ -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(sizeof(params.at(0).fontNoLiq)); i++) {