Skip to content

Commit

Permalink
Refactor DrawAccid()
Browse files Browse the repository at this point in the history
  • Loading branch information
yinanazhou committed Jan 18, 2024
1 parent ec4c4e6 commit cddede2
Showing 1 changed file with 2 additions and 14 deletions.
16 changes: 2 additions & 14 deletions src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit cddede2

Please sign in to comment.