2005-11-02 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/main.cc (LY_DEFINE): add gmane address.
+
+ * lily/beam.cc: remove calc_positions()
+
* lily/include/grob.hh (class Grob): move pscore, dim_cache_,
original_ in private scope.
(class Grob): drop pscore_ pointer, change to output_def pointer.
\version "2.7.13"
\header{
-texidoc = "Fully concave beams should be horizontal. Informally spoken,
+ texidoc = "Fully concave beams should be horizontal. Informally spoken,
concave refers to the shape of the notes that are opposite a
beam. If an up-beam has high notes on its center stems, then we call
it concave.
+ If a beam is fails a test, the desired slope is printed next to it.
- If a beam is fails a test, the desired slope is printed
-next to it."
+"
}
resetMeasure = \set Score.measurePosition = #(ly:make-moment 0 1)
-% examples from
+%% examples from Ross.
rossFourBeams =\relative c'' {
\time 2/4
c8[ e b c]
f,,[ b a g]
f[g g e]
a[ d, b' g]
- }
+}
rossThreeBeams = \relative c'' {
\time 6/8
e[ a, c] f[ d g]
rossBeams = \relative c'' {
\rossFourBeams
\rossThreeBeams
- }
-
+}
\layout{
raggedright = ##t
#(define (<> x y) (not (= x y)))
- \new Voice {
- \override Beam #'position-callbacks = #(check-slope-callbacks =)
- \rossBeams
-
- }
+\new Voice {
+ \override Beam #'positions = #(ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-slope-callbacks =))))
+ \rossBeams
+
+}
\version "2.7.13"
\header{
- texidoc="Beamed stems have standard lengths if possible. Quantization is switched off in this example."
- }
+ texidoc="Beamed stems have standard lengths if possible. Quantization is switched off in this example."
+}
\relative c'{
- \override Beam #'position-callbacks =
- #`(,Beam::least_squares
- ,Beam::check_concave
- ,Beam::slope_damping)
+ \override Beam #'position =
+ #(ly:make-simple-closure
+ (ly:make-simple-closure
+ (list chain-grob-member-functions
+ `(,cons 0 0)
+ Beam::calc_least_squares_positions
+ Beam::slope_damping
+ Beam::shift_region_to_valid
+ Beam::set_stem_lengths
+ )))
f4 f8[ f] f16[ f] f32[ f] f64[ f] f128[ f]
}
\version "2.7.13"
\header{
- texidoc="Beams in unnatural direction, have shortened stems, but do not look too short."
- }
+ texidoc="Beams in unnatural direction, have shortened stems, but do not look too short."
+}
\layout{ raggedright = ##t }
\relative c'{
- \override Beam #'position-callbacks =
- #`(,Beam::least_squares
- ,Beam::check_concave
- ,Beam::slope_damping)
+ \override Beam #'positions =
+ #(ly:make-simple-closure
+ (ly:make-simple-closure
+ (list chain-grob-member-functions
+ `(,cons 0 0)
+ Beam::calc_least_squares_positions
+ Beam::slope_damping
+ Beam::shift_region_to_valid
+ Beam::set_stem_lengths
+ )))
+
\stemUp
f'4 f8[ f] f16[ f] f32[ f] f64[ f] f128[ f]
}
me->set_property ("shorten", scm_from_double (shorten));
}
-MAKE_SCHEME_CALLBACK (Beam, calc_positions, 1);
-SCM
-Beam::calc_positions (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- if (!me->is_live ())
- return SCM_EOL;
-
- (void) me->get_property ("direction");
-
- SCM posns = scm_cons (SCM_BOOL_F, SCM_BOOL_F);
- me->set_property ("positions", posns);
-
- SCM callbacks = me->get_property ("position-callbacks");
- for (SCM i = callbacks; scm_is_pair (i); i = scm_cdr (i))
- scm_call_1 (scm_car (i), me->self_scm ());
-
- return SCM_UNSPECIFIED;
-}
-
void
{
return immutable_property_alist_ != SCM_EOL;
}
+
+
+bool
+Grob::internal_has_interface (SCM k)
+{
+ return scm_c_memq (k, interfaces_) != SCM_BOOL_F;
+}
-MAKE_SCHEME_CALLBACK(Grob, y_parent_positioning, 1);
-SCM
-Grob::y_parent_positioning (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- Grob *par = me->get_parent (Y_AXIS);
- if (par)
- (void) par->get_property ("positioning-done");
-
- return scm_from_double (0.0);
-}
-
-
-MAKE_SCHEME_CALLBACK(Grob, x_parent_positioning, 1);
-SCM
-Grob::x_parent_positioning (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
-
- Grob *par = me->get_parent (X_AXIS);
- if (par)
- (void) par->get_property ("positioning-done");
-
- return scm_from_double (0.0);
-}
Grob *
Grob::clone (int count) const
return new Grob (*this, count);
}
-/* TODO:
-
-- remove dynamic_cast<Spanner, Item> and put this code into respective
-subclass. */
-
-#define HASH_SIZE 3
-#define INFINITY_MSG "Infinity or NaN encountered"
-
Grob::Grob (SCM basicprops,
Object_key const *key)
{
Grob::~Grob ()
{
}
-
-
-static SCM
-grob_stencil_extent (Grob *me, Axis a)
-{
- Stencil *m = me->get_stencil ();
- Interval e;
- if (m)
- e = m->extent (a);
- return ly_interval2scm (e);
-}
-
-
-MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
-SCM
-Grob::stencil_height (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- return grob_stencil_extent (me, Y_AXIS);
-}
-
-MAKE_SCHEME_CALLBACK (Grob, stencil_width, 1);
-SCM
-Grob::stencil_width (SCM smob)
-{
- Grob *me = unsmob_grob (smob);
- return grob_stencil_extent (me, X_AXIS);
-}
-
-
-Interval
-robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
-{
- Interval ext = me->extent (refpoint, a);
- if (ext.is_empty ())
- ext.add_point (me->relative_coordinate (refpoint, a));
-
- return ext;
-}
-
+/****************************************************************
+ STENCILS
+****************************************************************/
Stencil *
Grob::get_stencil () const
return retval;
}
-/*
+/****************************************************************
VIRTUAL STUBS
-*/
+****************************************************************/
void
Grob::do_break_processing ()
{
}
+void
+Grob::discretionary_processing ()
+{
+}
+
System *
Grob::get_system () const
{
return 0;
}
-/* Translate in one direction. */
+/****************************************************************
+ OFFSETS
+****************************************************************/
+
void
Grob::translate_axis (Real y, Axis a)
{
if (isinf (y) || isnan (y))
{
- programming_error (_ (INFINITY_MSG));
+ programming_error (_ ("Infinity or NaN encountered"));
return ;
}
return *me->dim_cache_[a].offset_;
}
+
+/****************************************************************
+ extents
+****************************************************************/
+
void
Grob::flush_extent_cache (Axis axis)
{
return real_ext;
}
+/****************************************************************
+ REFPOINTS
+****************************************************************/
+
/* Find the group-element which has both #this# and #s# */
Grob *
Grob::common_refpoint (Grob const *s, Axis a) const
return 0;
}
-Grob *
-common_refpoint_of_list (SCM elist, Grob *common, Axis a)
+void
+Grob::set_parent (Grob *g, Axis a)
{
- for (; scm_is_pair (elist); elist = scm_cdr (elist))
- if (Grob *s = unsmob_grob (scm_car (elist)))
- {
- if (common)
- common = common->common_refpoint (s, a);
- else
- common = s;
- }
-
- return common;
+ dim_cache_[a].parent_ = g;
}
Grob *
-common_refpoint_of_array (Link_array<Grob> const &arr, Grob *common, Axis a)
-{
- for (int i = arr.size (); i--;)
- if (Grob *s = arr[i])
- {
- if (common)
- common = common->common_refpoint (s, a);
- else
- common = s;
- }
-
- return common;
-}
-
-String
-Grob::name () const
+Grob::get_parent (Axis a) const
{
- SCM meta = get_property ("meta");
- SCM nm = scm_assq (ly_symbol2scm ("name"), meta);
- nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL;
- return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name ();
+ return dim_cache_[a].parent_;
}
-void
-Grob::set_parent (Grob *g, Axis a)
-{
- dim_cache_[a].parent_ = g;
-}
void
Grob::fixup_refpoint ()
}
}
+
+/****************************************************************
+ MESSAGES
+****************************************************************/
void
Grob::warning (String s) const
{
::warning (s);
}
+
+String
+Grob::name () const
+{
+ SCM meta = get_property ("meta");
+ SCM nm = scm_assq (ly_symbol2scm ("name"), meta);
+ nm = (scm_is_pair (nm)) ? scm_cdr (nm) : SCM_EOL;
+ return scm_is_symbol (nm) ? ly_symbol2string (nm) : this->class_name ();
+}
+
void
Grob::programming_error (String s) const
{
else
::message (s);
}
-void
-Grob::discretionary_processing ()
-{
-}
-
-bool
-Grob::internal_has_interface (SCM k)
-{
- return scm_c_memq (k, interfaces_) != SCM_BOOL_F;
-}
-
-Grob *
-Grob::get_parent (Axis a) const
-{
- return dim_cache_[a].parent_;
-}
ADD_INTERFACE (Grob, "grob-interface",
"transparent "
);
+
+
+
+
+/****************************************************************
+ CALLBACKS
+****************************************************************/
+
+
+static SCM
+grob_stencil_extent (Grob *me, Axis a)
+{
+ Stencil *m = me->get_stencil ();
+ Interval e;
+ if (m)
+ e = m->extent (a);
+ return ly_interval2scm (e);
+}
+
+
+MAKE_SCHEME_CALLBACK (Grob, stencil_height, 1);
+SCM
+Grob::stencil_height (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ return grob_stencil_extent (me, Y_AXIS);
+}
+
+MAKE_SCHEME_CALLBACK(Grob, y_parent_positioning, 1);
+SCM
+Grob::y_parent_positioning (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ Grob *par = me->get_parent (Y_AXIS);
+ if (par)
+ (void) par->get_property ("positioning-done");
+
+ return scm_from_double (0.0);
+}
+
+
+MAKE_SCHEME_CALLBACK(Grob, x_parent_positioning, 1);
+SCM
+Grob::x_parent_positioning (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ Grob *par = me->get_parent (X_AXIS);
+ if (par)
+ (void) par->get_property ("positioning-done");
+
+ return scm_from_double (0.0);
+}
+
+MAKE_SCHEME_CALLBACK (Grob, stencil_width, 1);
+SCM
+Grob::stencil_width (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ return grob_stencil_extent (me, X_AXIS);
+}
+
+
+
+Grob *
+common_refpoint_of_list (SCM elist, Grob *common, Axis a)
+{
+ for (; scm_is_pair (elist); elist = scm_cdr (elist))
+ if (Grob *s = unsmob_grob (scm_car (elist)))
+ {
+ if (common)
+ common = common->common_refpoint (s, a);
+ else
+ common = s;
+ }
+
+ return common;
+}
+
+Grob *
+common_refpoint_of_array (Link_array<Grob> const &arr, Grob *common, Axis a)
+{
+ for (int i = arr.size (); i--;)
+ if (Grob *s = arr[i])
+ {
+ if (common)
+ common = common->common_refpoint (s, a);
+ else
+ common = s;
+ }
+
+ return common;
+}
+
+Interval
+robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
+{
+ Interval ext = me->extent (refpoint, a);
+ if (ext.is_empty ())
+ ext.add_point (me->relative_coordinate (refpoint, a));
+
+ return ext;
+}
+
#include "dimension-cache-callback.hh"
#include "lily-guile.hh"
-/**
- Adminstration of offset dimension info.
+/*
+ XY offset/refpoint/extent structure.
*/
class Dimension_cache
{
- /**
- The offset wrt. to the center of #parent_#
- */
Interval *extent_;
Real *offset_;
-
- /**
- What to call to find extent. Nil means empty.
- */
Grob *parent_;
+
friend class Grob;
Dimension_cache (Dimension_cache const &);
#include "grob-interface.hh"
#include "object-key.hh"
-typedef void (Grob:: *Grob_method_pointer) (void);
-
class Grob
{
private:
DECLARE_SMOBS (Grob, foo);
+ DECLARE_CLASSNAME(Grob);
+
void init ();
protected:
+ /* data */
+ Dimension_cache dim_cache_[NO_AXES];
+ Output_def *layout_;
+ Grob *original_;
Object_key const *key_;
+
+ /* SCM data */
SCM immutable_property_alist_;
SCM mutable_property_alist_;
SCM object_alist_;
lookups.
*/
SCM interfaces_;
-
- /* BARF */
- friend class Spanner;
- friend SCM ly_grob_properties (SCM);
- friend SCM ly_grob_basic_properties (SCM);
+
void substitute_object_links (SCM, SCM);
-
- DECLARE_CLASSNAME(Grob);
Real get_offset (Axis a) const;
-
- Output_def *layout_;
- Dimension_cache dim_cache_[NO_AXES];
- Grob *original_;
-
SCM try_callback (SCM, SCM);
public:
+
+ /* friends */
+ friend class Spanner;
+ friend class System;
+ friend SCM ly_grob_properties (SCM);
+ friend SCM ly_grob_basic_properties (SCM);
+
+ /* standard callbacks */
DECLARE_SCHEME_CALLBACK(x_parent_positioning, (SCM));
DECLARE_SCHEME_CALLBACK(y_parent_positioning, (SCM));
DECLARE_SCHEME_CALLBACK (stencil_height, (SCM smob));
void fixup_refpoint ();
};
+/* smob utilities */
DECLARE_UNSMOB (Grob, grob);
Spanner *unsmob_spanner (SCM);
Item *unsmob_item (SCM);
static bool has_interface (Grob *);
static SCM aligned_on_self (Grob *me, Axis a);
- static SCM centered_on_parent (Grob *me, Axis a);
+ static SCM centered_on_object (Grob *me, Axis a);
static SCM aligned_on_parent (Grob *me, Axis a);
static void set_center_parent (Grob *me, Axis a);
static void set_align_self (Grob *me, Axis a);
DECLARE_SCHEME_CALLBACK (centered_on_x_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (centered_on_y_parent, (SCM element));
+ DECLARE_SCHEME_CALLBACK (x_centered_on_y_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (aligned_on_x_parent, (SCM element));
DECLARE_SCHEME_CALLBACK (aligned_on_y_parent, (SCM element));
#include "source.hh"
#include "warn.hh"
+#include "ly-smobs.icc"
+
Lily_parser::Lily_parser (Sources *sources)
{
lexer_ = 0;
{
}
-#include "ly-smobs.icc"
-
-IMPLEMENT_SMOBS (Lily_parser);
-IMPLEMENT_TYPE_P (Lily_parser, "ly:lily-parser?");
-IMPLEMENT_DEFAULT_EQUAL_P (Lily_parser);
SCM
Lily_parser::mark_smob (SCM s)
error_level_ = 1;
}
-/****************************************************************/
+
+
+IMPLEMENT_SMOBS (Lily_parser);
+IMPLEMENT_TYPE_P (Lily_parser, "ly:lily-parser?");
+IMPLEMENT_DEFAULT_EQUAL_P (Lily_parser);
+
+
+/****************************************************************
+ OUTPUT-DEF
+ ****************************************************************/
Output_def *
-layout (Lily_parser *parser)
+get_layout (Lily_parser *parser)
{
SCM id = parser->lexer_->lookup_identifier ("$defaultlayout");
Output_def *layout = unsmob_output_def (id);
printf ("\n");
printf (Long_option_init::table_string (options_static).to_str0 ());
printf ("\n");
- printf (_f ("Report bugs to %s.", "bug-lilypond@gnu.org").to_str0 ());
+ printf (_f ("Report bugs to %s or via %s",
+ "bug-lilypond@gnu.org"
+ "http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs"
+ ).to_str0 ());
printf ("\n");
printf ("\n");
return SCM_UNSPECIFIED;
{
layout_ = layout;
system_ = 0;
- pscore_ = 0;
systems_ = SCM_EOL;
paper_systems_ = SCM_EOL;
}
{
if (layout_)
scm_gc_mark (layout_->self_scm ());
- if (pscore_)
- scm_gc_mark (pscore_->self_scm ());
scm_gc_mark (systems_);
scm_gc_mark (paper_systems_);
}
systems_ = scm_cons (system->self_scm (), systems_);
system->pscore_ = this;
- system->layout_ = pscore_->layout_;
+ system->layout_ = layout_;
system->unprotect ();
}
+SCM
+Self_alignment_interface::centered_on_object (Grob *him, Axis a)
+{
+ return scm_from_double (robust_relative_extent (him, him, a).center ());
+}
+
MAKE_SCHEME_CALLBACK (Self_alignment_interface, centered_on_x_parent, 1);
SCM
Self_alignment_interface::centered_on_x_parent (SCM smob)
{
- return centered_on_parent (unsmob_grob (smob), X_AXIS);
+ return centered_on_object (unsmob_grob (smob)->get_parent (X_AXIS), X_AXIS);
}
SCM
Self_alignment_interface::centered_on_y_parent (SCM smob)
{
- return centered_on_parent (unsmob_grob (smob), Y_AXIS);
+ return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), Y_AXIS);
}
+
+MAKE_SCHEME_CALLBACK (Self_alignment_interface, x_centered_on_y_parent, 1);
SCM
-Self_alignment_interface::centered_on_parent (Grob *me, Axis a)
+Self_alignment_interface::x_centered_on_y_parent (SCM smob)
{
- Grob *him = me->get_parent (a);
- Interval he = him->extent (him, a);
-
- return scm_from_double (he.is_empty () ? 0.0 : he.center ());
+ return centered_on_object (unsmob_grob (smob)->get_parent (Y_AXIS), X_AXIS);
}
MAKE_SCHEME_CALLBACK (Self_alignment_interface, aligned_on_x_parent,1);
}
else
{
- Link_array<Item> break_points = pscore_->root_system ()->broken_col_range (left, right);
+ System *root = get_root_system (this);
+ Link_array<Item> break_points = root->broken_col_range (left, right);
break_points.insert (left, 0);
break_points.push (right);
#include "all-font-metrics.hh"
#include "spacing-interface.hh"
#include "staff-symbol-referencer.hh"
-#include "paper-book.hh"
#include "paper-system.hh"
#include "tweak-registration.hh"
#include "grob-array.hh"
: Spanner (src, count)
{
all_elements_ = 0;
+ pscore_ = 0;
rank_ = 0;
init_elements ();
}
void
System::typeset_grob (Grob *elem)
{
- if (elem->pscore_)
+ if (elem->layout_)
programming_error ("adding element twice");
else
{
- elem->layout_ = pscore_->layout_;
+ elem->layout_ = pscore_->layout ();
all_elements_->add (elem);
elem->unprotect ();
}
get_root_system (Grob *me)
{
Grob *system_grob = me;
- while (system->get_parent (Y_AXIS))
- system = system->get_parent (Y_AXIS);
+
+ while (system_grob->get_parent (Y_AXIS))
+ system_grob = system_grob->get_parent (Y_AXIS);
return dynamic_cast<System*> (system_grob);
}
ADD_INTERFACE (System, "system-interface",
"This is the toplevel object: each object in a score "
"ultimately has a System object as its X and Y parent. ",
- "all-elements spaceable-staves columns")
+
+ /* properties */
+ "all-elements "
+ "spaceable-staves "
+ "columns"
+ )
void
Tweak_registry::insert_grob_tweak (Grob *g, SCM tweak)
{
- Object_key const *key = g->get_key ();
+ Object_key const *key = g->key ();
if (tweaks_.find (key) == tweaks_.end ())
tweaks_[key] = SCM_EOL;
void
Tweak_registry::replace_grob_tweak (Grob *g, SCM tweak)
{
- Object_key const *key = g->get_key ();
+ Object_key const *key = g->key ();
tweaks_[key] = scm_cons (tweak, SCM_EOL);
}
SCM
Tweak_registry::get_tweaks (Grob *g)
{
- Object_key const *key = g->get_key ();
+ Object_key const *key = g->key ();
if (tweaks_.find (key) == tweaks_.end ())
return SCM_EOL;
return tweaks_[key];
cbn n))))))
+
+% for regression testing purposes.
+assertBeamQuant =
+#(def-music-function (parser location l r) (pair? pair?)
+ (make-grob-property-override 'Beam 'positions
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-quant-callbacks l r))))))
+
+% for regression testing purposes.
+assertBeamSlope =
+#(def-music-function (parser location comp) (procedure?)
+ (make-grob-property-override 'Beam 'positions
+ (ly:make-simple-closure
+ (ly:make-simple-closure
+ (append
+ (list chain-grob-member-functions `(,cons 0 0))
+ (check-slope-callbacks comp))))))
+
+
+
+
%{
TODO:
%crescpoco = \set crescendoText = "cresc. poco a poco"
%decresc = \set crescendoText = "decr."
%dim = \set crescendoText = "dim."
-
-
-% for regression testing purposes.
-assertBeamQuant =
-#(def-music-function (parser location l r) (pair? pair?)
- (make-grob-property-override 'Beam 'positions
- (ly:make-simple-closure
- (ly:make-simple-closure
- (append
- (list chain-grob-member-functions `(,cons 0 0))
- (check-quant-callbacks l r))))))
-
-% for regression testing purposes.
-assertBeamSlope =
-#(def-music-function (parser location comp) (procedure?)
- (make-grob-property-override 'Beam 'positions
- (ly:make-simple-closure
- (ly:make-simple-closure
- (append
- (list chain-grob-member-functions `(,cons 0 0))
- (check-slope-callbacks comp))))))
-
-
def conv (str):
if re.search ('[XY]-offset-callbacks', str):
error_file.write (NOT_SMART % "[XY]-offset-callbacks")
+ if re.search ('position-callbacks', str):
+ error_file.write (NOT_SMART % "position-callbacks")
return str
conversions.append (((2, 7, 15), conv,
(stencil . ,Grid_line_interface::print)
(self-alignment-X . ,CENTER)
- (X-offset . (ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
- ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
+ (X-offset . ,(ly:make-simple-closure
+ `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_x_parent))
+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
(layer . 0)
(meta . ((class . Item)
(interfaces . (self-alignment-interface
. (
(springs-and-rods . ,Multi_measure_rest::set_spacing_rods)
(stencil . ,Text_interface::print)
- (self-X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::y_aligned_on_self))
- ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_y_parent)))))
+ (X-offset . ,(ly:make-simple-closure
+ `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self))
+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent)))))
(Y-offset . ,Side_position_interface::y_aligned_side)
(self-alignment-X . 0)
(direction . 1)
text-interface))))
))
-
(MultiMeasureRestText
. (
(stencil . ,Text_interface::print)
- (X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_y_parent))
- ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
+ (X-offset . ,(ly:make-simple-closure
+ `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::x_centered_on_y_parent))
+ ,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
(Y-offset . ,Side_position_interface::y_aligned_side)
(self-alignment-X . 0)
(PercentRepeatCounter
. (
(stencil . ,Text_interface::print)
- (X-offset . `(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_y_parent))
+ (X-offset . ,(ly:make-simple-closure `(,+ ,(ly:make-simple-closure (list Self_alignment_interface::centered_on_y_parent))
,(ly:make-simple-closure (list Self_alignment_interface::x_aligned_on_self)))))
(Y-offset . ,Side_position_interface::y_aligned_side)
(self-alignment-X . 0)
posns
))
+
(define ((check-beam-slope-sign comparison) beam posns)
"Check whether the slope of BEAM is correct wrt. COMPARISON."
(let* ((slope-sign (- (cdr posns) (car posns)))
))
-
(define-public (check-slope-callbacks comparison)
(list Beam::calc_least_squares_positions
Beam::slope_damping