*/
#include "gregorian-ligature-engraver.hh"
+
+#include "font-interface.hh"
#include "gregorian-ligature.hh"
-#include "vaticana-ligature.hh"
+#include "international.hh"
+#include "output-def.hh"
+#include "paper-column.hh"
#include "spanner.hh"
#include "staff-symbol-referencer.hh"
-#include "font-interface.hh"
+#include "vaticana-ligature.hh"
#include "warn.hh"
-#include "output-def.hh"
-#include "paper-column.hh"
#include "translator.icc"
int context_info, int delta_pitch);
bool is_stacked_head (int prefix_set,
int context_info);
- Real align_heads (Array<Grob_info> primitives,
+ Real align_heads (vector<Grob_info> primitives,
Real flexa_width,
Real thickness);
protected:
virtual Spanner *create_ligature_spanner ();
virtual void transform_heads (Spanner *ligature,
- Array<Grob_info> primitives);
+ vector<Grob_info> primitives);
};
Vaticana_ligature_engraver::Vaticana_ligature_engraver ()
}
Real
-Vaticana_ligature_engraver::align_heads (Array<Grob_info> primitives,
+Vaticana_ligature_engraver::align_heads (vector<Grob_info> primitives,
Real flexa_width,
Real thickness)
{
= dynamic_cast<Item *> (primitives[0].grob ())->get_column ();
Real join_thickness
- = thickness * column->layout ()->get_dimension (ly_symbol2scm ("linethickness"));
+ = thickness * column->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
/*
* Amount of extra space two put between some particular
Item *prev_primitive = 0;
int prev_prefix_set = 0;
- for (int i = 0; i < primitives.size (); i++)
+ for (vsize i = 0; i < primitives.size (); i++)
{
Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
int prefix_set
"ignoring grob");
continue;
}
- String glyph_name = ly_scm2string (glyph_name_scm);
+ string glyph_name = ly_scm2string (glyph_name_scm);
int delta_pitch = 0;
if (prev_primitive) /* urgh, need prev_primitive only here */
- Font_interface::get_default_font (primitive)->
find_by_name ("noteheads.s" + glyph_name).extent (X_AXIS).length ();
}
- else if (!String::compare (glyph_name, "flexa")
- || !String::compare (glyph_name, ""))
+ else if (glyph_name == "flexa" || glyph_name == "")
{
/*
* This head represents either half of a flexa shape.
ligature_width -= join_thickness;
}
}
- else if (!String::compare (glyph_name, ""))
+ else if (glyph_name == "")
{
/*
* This is the 2nd (virtual) head of flexa shape. Join it
= scm_to_int (primitive->get_property ("prefix-set"));
if (prefix_set & ~PES_OR_FLEXA)
{
- String prefs = Gregorian_ligature::prefixes_to_str (primitive);
+ string prefs = Gregorian_ligature::prefixes_to_str (primitive);
primitive->warning (_f ("ignored prefix (es) `%s' of this head according "
"to restrictions of the selected ligature style",
- prefs.to_str0 ()));
+ prefs.c_str ()));
}
}
void
Vaticana_ligature_engraver::transform_heads (Spanner *ligature,
- Array<Grob_info> primitives)
+ vector<Grob_info> primitives)
{
Real flexa_width = robust_scm2double (ligature->get_property ("flexa-width"), 2);
int prev_prefix_set = 0;
int prev_context_info = 0;
int prev_delta_pitch = 0;
- String prev_glyph_name = "";
- for (int i = 0; i < primitives.size (); i++)
+ string prev_glyph_name = "";
+ for (vsize i = 0; i < primitives.size (); i++)
{
Item *primitive = dynamic_cast<Item *> (primitives[i].grob ());
* this decision must be made here in the engraver rather than in
* the backend).
*/
- String glyph_name;
+ string glyph_name;
if (prefix_set & VIRGA)
{
glyph_name = "vaticana.punctum";
* head of a pes, and if it is a punctum.
*/
if ((context_info & FLEXA_LEFT) && ! (context_info & PES_UPPER))
- if (!String::compare (glyph_name, "vaticana.punctum"))
+ if (glyph_name == "vaticana.punctum")
primitive->set_property ("add-cauda", ly_bool2scm (true));
/*
{
if ((context_info & PES_UPPER) && (context_info & STACKED_HEAD))
{
- if (!String::compare (prev_glyph_name, "vaticana.punctum"))
+ if (prev_glyph_name == "vaticana.punctum")
if (prev_delta_pitch > 1)
prev_glyph_name = "vaticana.lpes";
else
if (prev_primitive)
prev_primitive->set_property ("glyph-name",
- scm_makfrom0str (prev_glyph_name.to_str0 ()));
+ scm_makfrom0str (prev_glyph_name.c_str ()));
/*
* In the backend, flexa shapes and joins need to know about line
}
prev_primitive->set_property ("glyph-name",
- scm_makfrom0str (prev_glyph_name.to_str0 ()));
+ scm_makfrom0str (prev_glyph_name.c_str ()));
align_heads (primitives, flexa_width, thickness);