コード例 #1
0
//---------------------------------------------------------------------------------------
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;
}
コード例 #2
0
//---------------------------------------------------------------------------------------
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;
}