neoscore.western.abstract_slur

class neoscore.western.abstract_slur.AbstractSlur[source]

Bases: MusicPath

An abstract superclass for slur and tie.

This is not meant to be used directly.

__init__(pos: PointDef, parent: PositionedObject, direction: DirectionY = DirectionY.UP, height: Optional[Unit] = None, arch_length: Optional[Unit] = None, font: Optional[MusicFont] = None, brush: Optional[BrushDef] = None, pen: Optional[PenDef] = None)[source]
Parameters
  • 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

draw_slur(end_pos, end_parent)[source]

Draw the slur shape.

This should generally not be called directly.