//--------------------------------------------------------------------------------------- GmoShapeArticulation* ArticulationEngraver::create_shape(ImoArticulation* pArticulation, UPoint pos, Color color, GmoShape* pParentShape) { m_pArticulation = pArticulation; m_placement = pArticulation->get_placement(); m_pParentShape = pParentShape; m_fAbove = determine_if_above(); int iGlyph = find_glyph(); double fontSize = determine_font_size(); UPoint position = compute_location(pos); ShapeId idx = 0; m_pArticulationShape = LOMSE_NEW GmoShapeArticulation(pArticulation, idx, iGlyph, position, color, m_libraryScope, fontSize); add_voice(); if (m_pArticulation->is_articulation_symbol() && m_pArticulation->get_articulation_type() != k_articulation_breath_mark && m_pArticulation->get_articulation_type() != k_articulation_caesura ) { center_on_parent(); } return m_pArticulationShape; }
//--------------------------------------------------------------------------------------- GmoShapeCodaSegno* CodaSegnoEngraver::create_shape(ImoSymbolRepetitionMark* pRepetitionMark, UPoint pos, Color color, GmoShape* pParentShape) { m_pRepetitionMark = pRepetitionMark; m_pParentShape = pParentShape; int iGlyph = find_glyph(); double fontSize = determine_font_size(); UPoint position = compute_location(pos); ShapeId idx = 0; m_pCodaSegnoShape = LOMSE_NEW GmoShapeCodaSegno(pRepetitionMark, idx, iGlyph, position, color, m_libraryScope, fontSize); center_on_parent(); return m_pCodaSegnoShape; }
//--------------------------------------------------------------------------------------- GmoShapeFermata* FermataEngraver::create_shape(ImoFermata* pFermata, UPoint pos, Color color, GmoShape* pParentShape) { m_pFermata = pFermata; m_placement = pFermata->get_placement(); m_pParentShape = pParentShape; m_fAbove = determine_if_above(); int iGlyph = find_glyph(); double fontSize = determine_font_size(); UPoint position = compute_location(pos); ShapeId idx = 0; m_pFermataShape = LOMSE_NEW GmoShapeFermata(pFermata, idx, iGlyph, position, color, m_libraryScope, fontSize); add_voice(); center_on_parent(); return m_pFermataShape; }
//--------------------------------------------------------------------------------------- GmoShape* ClefEngraver::create_shape(ImoClef* pCreatorImo, UPoint uPos, int clefType, int symbolSize, Color color) { m_nClefType = clefType; m_symbolSize = symbolSize; m_iGlyph = find_glyph(clefType); // get the shift to the staff on which the clef must be drawn LUnits y = uPos.y + m_pMeter->tenths_to_logical(get_glyph_offset(), m_iInstr, m_iStaff); //Add minimum space before clef change LUnits x = uPos.x; if (symbolSize == k_size_cue) x += m_pMeter->tenths_to_logical(20.0f, m_iInstr, m_iStaff); double fontSize = determine_font_size(); //create the shape object ShapeId idx = 0; m_pClefShape = LOMSE_NEW GmoShapeClef(pCreatorImo, idx, m_iGlyph, UPoint(x, y), color, m_libraryScope, fontSize); return m_pClefShape; }