From cddede24ff479191a5f0830f7385b12a015d1bae Mon Sep 17 00:00:00 2001 From: Yinan Zhou Date: Thu, 18 Jan 2024 17:03:06 -0500 Subject: [PATCH] Refactor DrawAccid() --- src/view_element.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/src/view_element.cpp b/src/view_element.cpp index 5b2525d205a..a5f00f097b4 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -299,20 +299,8 @@ void View::DrawAccid(DeviceContext *dc, LayerElement *element, Layer *layer, Sta y = (accid->GetPlace() == STAFFREL_below) ? y - extend.m_ascent - unit : y + extend.m_descent + unit; } - if (notationType == NOTATIONTYPE_neume) { - int rotationOffset = 0; - if (m_doc->IsFacs() && (staff->GetDrawingRotate() != 0)) { - double deg = staff->GetDrawingRotate(); - int xDiff = x - staff->GetDrawingX(); - rotationOffset = int(xDiff * tan(deg * M_PI / 180.0)); - } - else if (staff->HasDrawingRotation()) { - rotationOffset = staff->GetDrawingRotationOffsetFor(x); - } - if (accid->HasFacs() && m_doc->IsFacs()) { - y = ToLogicalY(y); - } - y -= rotationOffset; + if (staff->HasDrawingRotation()) { + y -= staff->GetDrawingRotationOffsetFor(x); } this->DrawSmuflString(