Skip to content

Commit

Permalink
Changing LayerElement::m_darwingStemDir to data_STEMDIRECTION
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed Mar 14, 2015
1 parent 75208b9 commit e82a67d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
6 changes: 4 additions & 2 deletions include/vrv/layerelement.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,10 @@ class LayerElement: public DocObject
/** If this is a note, store here the stem coordinates (useful for ex. tuplets) */
Point m_drawingStemStart; // beginning point, the one near the note
Point m_drawingStemEnd; // end point (!), near beam or stem
/** stem direction as drawn, true = up, false = down */
bool m_drawingStemDir;
/**
* Stem direction as drawn
*/
data_STEMDIRECTION m_drawingStemDir;
/**
* This store a pointer to the corresponding BeamElementCoord(currentDur > DUR_4)
*/
Expand Down
1 change: 1 addition & 0 deletions src/layerelement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ void LayerElement::Reset()

m_isScoreOrStaffDefAttr = false;
m_alignment = NULL;
m_drawingStemDir = STEMDIRECTION_NONE;
m_beamElementCoord = NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion src/view_beam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ void View::DrawBeamPostponed( DeviceContext *dc, Layer *layer, Beam *beam, Staff
(*beamElementCoords)[i]->m_element->m_drawingStemStart.x = (*beamElementCoords)[i]->m_element->m_drawingStemEnd.x = (*beamElementCoords)[i]->m_x;
(*beamElementCoords)[i]->m_element->m_drawingStemStart.y = fy2;
(*beamElementCoords)[i]->m_element->m_drawingStemEnd.y = fy1;
(*beamElementCoords)[i]->m_element->m_drawingStemDir = false;
(*beamElementCoords)[i]->m_element->m_drawingStemDir = stemDir;

if((*beamElementCoords)[i]->m_element->IsNote() || (*beamElementCoords)[i]->m_element->IsChord())
DrawVerticalLine (dc,fy2, fy1, (*beamElementCoords)[i]->m_x, m_doc->m_style->m_stemWidth);
Expand Down
4 changes: 2 additions & 2 deletions src/view_element.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data
object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2);
object->m_drawingStemStart.y = y1;
object->m_drawingStemEnd.y = y2;
object->m_drawingStemDir = true;
object->m_drawingStemDir = STEMDIRECTION_up;

if (drawingDur > DUR_4) {
DrawSmuflCode( dc, x2 - m_doc->m_style->m_stemWidth, y2, SMUFL_E240_flag8thUp, staff->staffSize, object->m_cueSize );
Expand All @@ -523,7 +523,7 @@ void View::DrawStem( DeviceContext *dc, LayerElement *object, Staff *staff, data
object->m_drawingStemStart.x = object->m_drawingStemEnd.x = x2 - (m_doc->m_style->m_stemWidth / 2);
object->m_drawingStemStart.y = y1;
object->m_drawingStemEnd.y = y2;
object->m_drawingStemDir = false;
object->m_drawingStemDir = STEMDIRECTION_down;

if (drawingDur > DUR_4) {
DrawSmuflCode( dc, x2 , y2, SMUFL_E241_flag8thDown , staff->staffSize, object->m_cueSize );
Expand Down

0 comments on commit e82a67d

Please sign in to comment.