lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

why don't align to x-extent of a Paper_column?


From: Janek Warchoł
Subject: why don't align to x-extent of a Paper_column?
Date: Wed, 4 Jul 2012 19:34:45 +0200

Hi,

as i'm working with grob alignment, i've stumbled upon

if (Paper_column::has_interface (him))
    return scm_from_double (0.0);

in Self_alignment_interface::aligned_on_parent - I'm not sure what is
its purpose.  This was introduced by Han-Wen's commit
ebb1f1f12ab21af1d365a635aa17e39e47a7c2b5, but the commit doesn't
contain any additional explanations.
My understanding is that a PaperColumn doesn't have well-defined
extent, so if some grob's parent is a PaperColumn, it doesn't make
sense to calculate the alignment based on extents.  Am i right?
If so, i suppose that it's not necessary to immediately return in such
a case - we could just skip

  Interval he = him->extent (him, a);
  if (!he.is_empty ())
    x += he.linear_combination (align);

and calculate the offset based on grob's extent - this would
effectively work as Self_alignment_interface::aligned_on_self.  Did i
get it right?

cheers,
Janek



reply via email to

[Prev in Thread] Current Thread [Next in Thread]