neoscore.interface.path_interface

class neoscore.interface.path_interface.ResolvedMoveTo[source]

Bases: tuple

A canvas-space move-to element.

property x
property y
static __new__(_cls, x: Unit, y: Unit)

Create new instance of ResolvedMoveTo(x, y)

class neoscore.interface.path_interface.ResolvedLineTo[source]

Bases: tuple

A canvas-space line-to element.

property x
property y
static __new__(_cls, x: Unit, y: Unit)

Create new instance of ResolvedLineTo(x, y)

class neoscore.interface.path_interface.ResolvedCurveTo[source]

Bases: tuple

A canvas-space curve-to element.

property c1_x
property c1_y
property c2_x
property c2_y
property end_x
property end_y
static __new__(_cls, c1_x: Unit, c1_y: Unit, c2_x: Unit, c2_y: Unit, end_x: Unit, end_y: Unit)

Create new instance of ResolvedCurveTo(c1_x, c1_y, c2_x, c2_y, end_x, end_y)

neoscore.interface.path_interface.ResolvedPathElement

A path element whose position is relative to its path

alias of Union[ResolvedMoveTo, ResolvedLineTo, ResolvedCurveTo]

class neoscore.interface.path_interface.PathInterface[source]

Bases: PositionedObjectInterface

Interface for a generic graphic path object.

__init__(pos: Point, brush: BrushInterface, pen: PenInterface, elements: List[ResolvedPathElement], rotation: float = 0, background_brush: Optional[BrushInterface] = None, z_index: int = 0, clip_start_x: Optional[Unit] = None, clip_width: Optional[Unit] = None) None
brush: BrushInterface
pen: PenInterface
elements: List[ResolvedPathElement]
rotation: float = 0

Rotation angle in degrees

background_brush: Optional[BrushInterface] = None
z_index: int = 0

Z-index controlling draw order.

clip_start_x: Optional[Unit] = None

The local starting position of the drawn region in the glyph.

Use None to render from the start

clip_width: Optional[Unit] = None

The width of the visible region.

Use None to render to the end.

static create_qt_path(elements: List[ResolvedPathElement]) QPainterPath[source]
render()[source]

Render the path to the scene.