class neoscore.core.music_path.MusicPath[source]

Bases: Path, HasMusicFont

A Path with a music font.

This is mostly useful as a superclass for paths which use a MusicFont’s engraving defaults and staff unit to control their appearance, but it can also be instantiated directly.

__init__(pos: PointDef, parent: Optional[PositionedObject] = None, font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None, rotation: float = 0, background_brush: Optional[BrushDef] = None, transform_origin: PointDef = ORIGIN)[source]
  • pos – The position of the path root.

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

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

  • brush – The brush to fill shapes with.

  • pen – The pen to draw outlines with.

  • rotation – Angle in degrees. Rotated paths with flowable breaks and path elements anchored to other objects are not currently supported.

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

  • transform_origin – The origin point for rotation and scaling transforms

property music_font: MusicFont

The music font used by this object.