diff --git a/include/vrv/doc.h b/include/vrv/doc.h index 76ae25b23f4..bf4df7e162e 100644 --- a/include/vrv/doc.h +++ b/include/vrv/doc.h @@ -261,10 +261,6 @@ class Doc: public Object int m_drawingBrevisWidth[2]; /** Accident width for normal and small staff and normal and grace size */ int m_drawingAccidWidth[2][2]; - /** A vertical unit corresponding to the 1/4 of an interline */ - float m_drawingVerticalUnit1[2]; - /** A vertical unit corresponding to the 1/8 of an interline */ - float m_drawingVerticalUnit2[2]; /** Current music font for normal and small staff and normal and grace size */ FontMetricsInfo m_drawingFonts[2][2]; /** music font */ diff --git a/src/doc.cpp b/src/doc.cpp index c481d600b30..87e1bef13ae 100644 --- a/src/doc.cpp +++ b/src/doc.cpp @@ -399,11 +399,6 @@ Page *Doc::SetDrawingPage( int pageIdx ) m_drawingLyricFonts[0].SetPointSize( m_drawingLyricFont.GetPointSize() ); m_drawingLyricFonts[1].SetPointSize( m_drawingLyricFont.GetPointSize() ); - m_drawingVerticalUnit1[0] = (float)m_drawingInterl[0]/4; - m_drawingVerticalUnit2[0] = (float)m_drawingInterl[0]/8; - m_drawingVerticalUnit1[1] = (float)m_drawingInterl[1]/4; - m_drawingVerticalUnit2[1] = (float)m_drawingInterl[1]/8; - float glyph_size; Glyph *glyph; int x, y, w, h; diff --git a/src/view_beam.cpp b/src/view_beam.cpp index 3cd1bb41c18..88058600201 100755 --- a/src/view_beam.cpp +++ b/src/view_beam.cpp @@ -477,17 +477,17 @@ if (fPente) if (fb.fl_cond) /* esth: eviter que queues depassent barres */ { if (crd[i].prov) /* venant du haut, m_stemDir en bas */ { /***fy1 = *(_ybeam+i)+v_pnt;***/ /* on raccourcit m_stemDir */ - fy2 = crd[i].b-m_doc->m_drawingVerticalUnit2[staff->staffSize]; + fy2 = crd[i].b-m_doc->m_drawingHalfInterl[staff->staffSize]/4; } else { /***fy1 = *(_ybeam+i)-e_t->v_pnt;***/ /* on allonge m_stemDir */ - fy2 = crd[i].b+m_doc->m_drawingVerticalUnit2[staff->staffSize]; + fy2 = crd[i].b+m_doc->m_drawingHalfInterl[staff->staffSize]/4; } } else // on tient compte de l'‚paisseur qui fait des "bosses" { if (fb.dir == STEMDIRECTION_up) // m_stemDir en haut { fy1 = *(_ybeam+i) - m_doc->m_env.m_stemWidth; - fy2 = crd[i].b+m_doc->m_drawingVerticalUnit2[staff->staffSize]; + fy2 = crd[i].b+m_doc->m_drawingHalfInterl[staff->staffSize]/4; crd[i].chk->m_drawingStemStart.x = crd[i].chk->m_drawingStemEnd.x = crd[i].a; crd[i].chk->m_drawingStemStart.y = fy2; crd[i].chk->m_drawingStemEnd.y = fy1; @@ -495,7 +495,7 @@ if (fPente) } else { fy1 = *(_ybeam+i) + m_doc->m_env.m_stemWidth; - fy2 = crd[i].b-m_doc->m_drawingVerticalUnit2[staff->staffSize]; + fy2 = crd[i].b-m_doc->m_drawingHalfInterl[staff->staffSize]/4; crd[i].chk->m_drawingStemStart.x = crd[i].chk->m_drawingStemEnd.x = crd[i].a; crd[i].chk->m_drawingStemStart.y = fy2; crd[i].chk->m_drawingStemEnd.y = fy1; diff --git a/src/view_element.cpp b/src/view_element.cpp index 94fb6b1c6d6..0941d309260 100644 --- a/src/view_element.cpp +++ b/src/view_element.cpp @@ -397,11 +397,11 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St if (staff->notAnc) DrawVerticalLine ( dc,y2,(int)(ynn + m_doc->m_drawingHalfInterl[staffSize]),x2, m_doc->m_env.m_stemWidth );//queue en descendant else - DrawVerticalLine ( dc,y2,(int)(ynn+ m_doc->m_drawingVerticalUnit2[staffSize]),x2 - (m_doc->m_env.m_stemWidth / 2), m_doc->m_env.m_stemWidth );//queue en descendant + DrawVerticalLine ( dc,y2,(int)(ynn+ m_doc->m_drawingHalfInterl[staffSize]/4),x2 - (m_doc->m_env.m_stemWidth / 2), m_doc->m_env.m_stemWidth );//queue en descendant element->m_drawingStemStart.x = element->m_drawingStemEnd.x = x2 - (m_doc->m_env.m_stemWidth / 2); element->m_drawingStemEnd.y = y2; - element->m_drawingStemStart.y = (int)(ynn+ m_doc->m_drawingVerticalUnit2[staffSize]); + element->m_drawingStemStart.y = (int)(ynn+ m_doc->m_drawingHalfInterl[staffSize]/4); element->m_drawingStemDir = true; if (formval > DUR_4) @@ -423,10 +423,10 @@ void View::DrawNote ( DeviceContext *dc, LayerElement *element, Layer *layer, St if (staff->notAnc) DrawVerticalLine ( dc,y2,ynn- m_doc->m_drawingHalfInterl[staffSize],x2 - (m_doc->m_env.m_stemWidth / 2), m_doc->m_env.m_stemWidth );//queue en descendant else - DrawVerticalLine ( dc,y2,(int)(ynn- m_doc->m_drawingVerticalUnit2[staffSize]),x2 - (m_doc->m_env.m_stemWidth / 2), m_doc->m_env.m_stemWidth ); // queue en montant + DrawVerticalLine ( dc,y2,(int)(ynn- m_doc->m_drawingHalfInterl[staffSize]/4),x2 - (m_doc->m_env.m_stemWidth / 2), m_doc->m_env.m_stemWidth ); // queue en montant element->m_drawingStemStart.x = element->m_drawingStemEnd.x = x2 - (m_doc->m_env.m_stemWidth / 2); - element->m_drawingStemStart.y = (int)(ynn- m_doc->m_drawingVerticalUnit2[staffSize]); + element->m_drawingStemStart.y = (int)(ynn- m_doc->m_drawingHalfInterl[staffSize]/4); element->m_drawingStemEnd.y = y2; element->m_drawingStemDir = false; @@ -943,8 +943,8 @@ void View::DrawLigature ( DeviceContext *dc, int y, LayerElement *element, Layer x1 = xn - m_doc->m_drawingBrevisWidth[staff->staffSize]; x2 = xn + m_doc->m_drawingBrevisWidth[staff->staffSize]; y1 = y + m_doc->m_drawingHalfInterl[staff->staffSize]; y2 = y - m_doc->m_drawingHalfInterl[staff->staffSize]; - y3 = (int)(y1 + m_doc->m_drawingVerticalUnit1[staff->staffSize]); // partie d'encadrement qui depasse - y4 = (int)(y2 - m_doc->m_drawingVerticalUnit1[staff->staffSize]); + y3 = (int)(y1 + m_doc->m_drawingHalfInterl[staff->staffSize]/2); // partie d'encadrement qui depasse + y4 = (int)(y2 - m_doc->m_drawingHalfInterl[staff->staffSize]/2); //if (!note->m_ligObliqua && (!View::s_drawingLigObliqua)) // notes rectangulaires, y c. en ligature @@ -1445,7 +1445,7 @@ void View::DrawCustos( DeviceContext *dc, LayerElement *element, Layer *layer, S int x = element->GetDrawingX(); int y = element->GetDrawingY(); - y -= m_doc->m_drawingHalfInterl[staff->staffSize] - m_doc->m_drawingVerticalUnit2[staff->staffSize]; // LP - correction in 2.0.0 + y -= m_doc->m_drawingHalfInterl[staff->staffSize] - m_doc->m_drawingHalfInterl[staff->staffSize]/4; // LP - correction in 2.0.0 // HARDCODED (smufl code wrong) DrawSmuflCode( dc, x, y, 35, staff->staffSize, custos->m_cueSize ); diff --git a/src/view_page.cpp b/src/view_page.cpp index be2d7bf64b0..562dd08829c 100644 --- a/src/view_page.cpp +++ b/src/view_page.cpp @@ -801,7 +801,7 @@ int View::CalculatePitchCode ( Layer *layer, int y_n, int x_pos, int *octave ) Staff *parentStaff = dynamic_cast(layer->m_parent); int staffSize = parentStaff->staffSize; // calculer position du do central en fonction clef - y_n += (int) m_doc->m_drawingVerticalUnit2[staffSize]; + y_n += (int) m_doc->m_drawingHalfInterl[staffSize]/4; yb = parentStaff->GetDrawingY() - m_doc->m_drawingStaffSize[staffSize]*2; // UT1 default