class neoscore.core.repeating_music_text_line.RepeatingMusicTextLine[source]

Bases: Spanner2D, MusicText

A spanner of repeating music text over its length.

This automatically rotates the text to support 2D lines, but please note that rotated text breaking across flowable lines is not yet fully supported and will display incorrectly.

__init__(start: PointDef, start_parent: Optional[PositionedObject], end_pos: PointDef, end_parent: Optional[PositionedObject], text: MusicStringDef, start_cap_text: Optional[MusicStringDef] = None, end_cap_text: Optional[MusicStringDef] = None, font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None, background_brush: Optional[BrushDef] = None)[source]
  • start – The starting point.

  • start_parent – If no font is given, this or one of its ancestors must implement HasMusicFont.

  • end_pos – The end point.

  • end_parent – The parent for the ending position. If None, defaults to self. (Note the lack of a default argument here: unlike with most other spanners, None must be given explicitly.)

  • text – The text to be repeated over the spanner. Can be given as a SMuFL glyph name, or other shorthand forms. See MusicStringDef.

  • start_cap_text – A text specifier for the start of the text. Useful for things like “tr” beginnings to trill lines. This can be provided in the same form as text.

  • end_cap_text – A text specifier for the end of the text. Especially useful for line terminators like arrows at the end of arppeggio lines. This can be provided in the same form as text.

  • font – If provided, this overrides any font found in the ancestor chain.

  • brush – The brush to fill in text shapes with.

  • pen – The pen to trace text outlines with. This defaults to no pen.

  • background_brush – Optional brush used to paint the text’s bounding rect behind it.