3.2.124 self-alignment-interface

Position this object on itself and/or on its parent. To this end, the following functions are provided:

ly:self-alignment-interface::x-aligned-on-self
ly:self-alignment-interface::y-aligned-on-self

Align self on reference point, using self-alignment-X and self-alignment-Y, respectively.

ly:self-alignment-interface::aligned-on-x-parent
ly:self-alignment-interface::aligned-on-y-parent

Align reference point of self with the reference point of parent. The position of the own reference point is adjusted with self-alignment-X and self-alignment-Y, the position of the parent’s reference point with parent-alignment-X and parent-alignment-Y, respectively.

Function ly:self-alignment-interface::aligned-on-x-parent listens to the property X-alignment-extent of the PaperColumn grob, using it as a fallback width for parent alignment in case the PaperColumn grob does not contain note heads.

ly:self-alignment-interface::centered-on-x-parent
ly:self-alignment-interface::centered-on-y-parent

Shift the object so its own reference point is centered on the extent of the parent.

User-settable properties:

parent-alignment-X (number)

Specify on which point of the parent the object is aligned. The value -1 means aligned on parent’s left edge, 0 on center, and 1 right edge, in X direction. Other numerical values may also be specified - the unit is half the parent’s width. If not a number, align on the parent’s reference point. If unset, the value from self-alignment-X property will be used.

parent-alignment-Y (number)

Like parent-alignment-X but for the Y axis.

self-alignment-X (number)

Specify alignment of an object. The value -1 means left aligned, 0 centered, and 1 right-aligned in X direction. Other numerical values may also be specified - the unit is half the object width. If not a number, align on the object’s reference point.

self-alignment-Y (number)

Like self-alignment-X but for the Y axis.

X-align-on-main-noteheads (boolean)

If true, this grob will ignore suspended noteheads when aligning itself on NoteColumn.

This grob interface is used in the following graphical object(s): AccidentalSuggestion, BarNumber, CaesuraScript, ClefModifier, CodaMark, CombineTextScript, DoublePercentRepeatCounter, DynamicText, Fingering, GridLine, Hairpin, HorizontalBracketText, InstrumentName, InstrumentSwitch, JumpScript, LyricRepeatCount, LyricText, MeasureCounter, MeasureSpanner, MetronomeMark, MultiMeasureRestNumber, MultiMeasureRestScript, MultiMeasureRestText, NoteName, PercentRepeatCounter, RehearsalMark, Script, SectionLabel, SegnoMark, SostenutoPedal, StemTremolo, StringNumber, StrokeFinger, SustainPedal, TextMark, TextScript and UnaCordaPedal.


LilyPond Internals Reference v2.25.21 (development-branch).