Skip to content

Commit

Permalink
Handle liquescent in DrawNc()
Browse files Browse the repository at this point in the history
  • Loading branch information
yinanazhou committed Jan 9, 2024
1 parent e28d1c7 commit 693985b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/view_neume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
params.at(0).fontNo = SMUFL_E997_chantPunctumVirgaReversed;
}

else if (nc->GetCurve() == curvatureDirection_CURVE_c) {
else if (nc->GetCurve() == curvatureDirection_CURVE_c && nc->FindDescendantByType(LIQUESCENT)) {
params.at(0).fontNoLiq[0] = SMUFL_E9BE_chantConnectingLineAsc3rd;
params.at(0).fontNoLiq[1] = SMUFL_EB92_staffPosRaise3;
params.at(0).fontNoLiq[2] = SMUFL_E995_chantAuctumDesc;
Expand All @@ -187,7 +187,7 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
params.at(0).yOffsetLiq[0] = -1.5;
params.at(0).yOffsetLiq[4] = -1.75;
}
else if (nc->GetCurve() == curvatureDirection_CURVE_a) {
else if (nc->GetCurve() == curvatureDirection_CURVE_a && nc->FindDescendantByType(LIQUESCENT)) {
params.at(0).fontNoLiq[0] = SMUFL_E9BE_chantConnectingLineAsc3rd;
params.at(0).fontNoLiq[1] = SMUFL_EB98_staffPosLower1;
params.at(0).fontNoLiq[2] = SMUFL_E994_chantAuctumAsc;
Expand Down Expand Up @@ -274,7 +274,9 @@ void View::DrawNc(DeviceContext *dc, LayerElement *element, Layer *layer, Staff
}

// Draw the children
this->DrawLayerChildren(dc, nc, layer, staff, measure);
if (!nc->FindDescendantByType(LIQUESCENT)) {
this->DrawLayerChildren(dc, nc, layer, staff, measure);
}

dc->EndGraphic(element, this);
}
Expand Down

0 comments on commit 693985b

Please sign in to comment.