Grob * me = unsmob_grob (element_smob);
Axis ax = (Axis)gh_scm2int (axis);
Grob * par = me->get_parent (ax);
- if (par && !to_boolean (par->get_grob_property ("alignment-done")))
+ if (par && !to_boolean (par->get_grob_property ("positioning-done")))
{
Align_interface::align_elements_to_extents (par, ax);
}
Grob * me = unsmob_grob (element_smob);
Axis ax = (Axis)gh_scm2int (axis);
Grob * par = me->get_parent (ax);
- if (par && !to_boolean (par->get_grob_property ("alignment-done")))
+ if (par && !to_boolean (par->get_grob_property ("positioning-done")))
{
Align_interface::align_to_fixed_distance (par, ax);
}
void
Align_interface::align_to_fixed_distance (Grob *me , Axis a)
{
- me->set_grob_property ("alignment-done", SCM_BOOL_T);
+ me->set_grob_property ("positioning-done", SCM_BOOL_T);
SCM d = me->get_grob_property ("stacking-dir");
if (!stacking_dir)
stacking_dir = DOWN;
- SCM force = me->get_grob_property ("forced-distance");
-
- Real dy = 0.0;
- if (gh_number_p (force))
- {
- dy = gh_scm2double (force);
- }
+ Real dy = robust_scm2double (me->get_grob_property ("forced-distance"),0.0);
Link_array<Grob> elems
= Pointer_group_interface__extract_grobs (me, (Grob*) 0, "elements");
void
Align_interface::align_elements_to_extents (Grob * me, Axis a)
{
- me->set_grob_property ("alignment-done", SCM_BOOL_T);
+ me->set_grob_property ("positioning-done", SCM_BOOL_T);
SCM d = me->get_grob_property ("stacking-dir");
if (!stacking_dir)
stacking_dir = DOWN;
- Interval threshold = Interval (0, Interval::infinity ());
- SCM thr = me->get_grob_property ("threshold");
- if (gh_pair_p (thr))
- {
- threshold[SMALLER] = gh_scm2double (ly_car (thr));
- threshold[BIGGER] = gh_scm2double (ly_cdr (thr));
- }
-
+ Interval threshold = robust_scm2interval ( me->get_grob_property ("threshold"), Interval (0, Interval::infinity ()));
Array<Interval> dims;
ADD_INTERFACE (Align_interface, "align-interface",
" Order grobs top to bottom/left to right/right to left etc.",
- "forced-distance stacking-dir align-dir threshold alignment-done center-element elements axes");
+ "forced-distance stacking-dir align-dir threshold positioning-done center-element elements axes");
struct Foobar