//---------------------------------------------------------------------------------------
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;
}
Esempio n. 2
0
//---------------------------------------------------------------------------------------
void TieEngraver::create_two_shapes()
{
    m_numShapes = 2;

    //create first shape
    compute_start_point();
    compute_end_of_staff_point();
    compute_default_control_points(&m_points1[0]);
    add_user_displacements(0, &m_points1[0]);
    GmoShapeTie* pTieShape =
        LOMSE_NEW GmoShapeTie(m_pTie, 0, &m_points1[0], m_thickness, m_color);
    m_shapesInfo[0].pShape = pTieShape;
    add_voice(pTieShape);

    //create second shape
    compute_end_point(&m_points2[ImoBezierInfo::k_end]);
    compute_start_of_staff_point();
    compute_default_control_points(&m_points2[0]);
    add_user_displacements(1, &m_points2[0]);
    pTieShape = LOMSE_NEW GmoShapeTie(m_pTie, 1, &m_points2[0], m_thickness, m_color);
    m_shapesInfo[1].pShape = pTieShape;
    add_voice(pTieShape);
}
Esempio n. 3
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;
}