*/
#include "script-column.hh"
#include "side-position-interface.hh"
-
+#include "warn.hh"
#include "group-interface.hh"
void
for (int i=0; i < staff_sided.size (); i++)
{
- arrs[Side_position_interface::get_direction (staff_sided[i])]
- .push (staff_sided[i]);
+ Direction d = Side_position_interface::get_direction (staff_sided[i]);
+ if (!d)
+ {
+ programming_error ( "No direction for script?");
+ d = DOWN;
+ staff_sided[i]->set_grob_property ("direction", gh_int2scm (d));
+ }
+
+ arrs[d].push (staff_sided[i]);
}
Direction d = DOWN;
Real y1 = Staff_symbol_referencer::position_f (first_head (me));
Real y2 = stem_end_position (me);
- Interval stem_y (y1,y2);
- stem_y.unite (Interval (y2,y1));
+ Interval stem_y (y1 <? y2,y2 >? y1);
+
// dy?
- Real dy = Staff_symbol_referencer::staff_space (me)/2.0;
+ Real dy = Staff_symbol_referencer::staff_space (me) * 0.5;
if (Grob *hed = support_head (me))
{
- Interval head_height = hed->extent (hed,Y_AXIS);
+ /*
+ must not take ledgers into account.
+ */
+ Interval head_height = Note_head::head_extent (hed,Y_AXIS);
Real y_attach = Note_head::stem_attachment_coordinate ( hed, Y_AXIS);
y_attach = head_height.linear_combination (y_attach);
#include "translator-group.hh"
#include "warn.hh"
#include "music-output-def.hh"
-
#include "ly-smobs.icc"
int
return me->type_name_;
}
-SCM push_sym;
-SCM assign_sym;
-
-static void
-foo_init ()
-{
- push_sym = scm_permanent_object (ly_symbol2scm ("push"));
- assign_sym = scm_permanent_object (ly_symbol2scm ("assign"));
-}
-
-ADD_SCM_INIT_FUNC (transdef, foo_init);
Translator_def::Translator_def ()
{
void
Translator_def::add_push_property (SCM props, SCM syms, SCM vals)
{
- this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, vals, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, vals, SCM_UNDEFINED),
this->property_ops_);
}
void
Translator_def::add_pop_property (SCM props, SCM syms)
{
- this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, SCM_UNDEFINED),
this->property_ops_);
}
tg->output_def_l_ = md;
tg->definition_ = self_scm ();
tg->type_str_ = ly_scm2string (type_name_);
+
+ /*
+ TODO: ugh. we're reversing CONSISTS_NAME_LIST_ here
+ */
SCM l1 = trans_list (consists_name_list_, tg);
SCM l2 =trans_list (end_consists_name_list_,tg);
l1 = scm_reverse_x (l1, l2);
SCM type = ly_car (entry);
entry = ly_cdr (entry);
- if (type == push_sym)
+ if (type == ly_symbol2scm ("push"))
{
SCM val = ly_cddr (entry);
val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
apply_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val);
}
- else if (type == assign_sym)
+ else if (type == ly_symbol2scm ("assign"))
{
tg->internal_set_property (ly_car (entry), ly_cadr (entry));
}
void
Translator_def::add_property_assign (SCM nm, SCM val)
{
- this->property_ops_ = gh_cons (scm_list_n (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
+ this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("assign"), scm_string_to_symbol (nm), val, SCM_UNDEFINED),
this->property_ops_);
}