neoscore.interface.text_interface

class neoscore.interface.text_interface.TextInterface[source]

Bases: PositionedObjectInterface

An interface for graphical text objects.

brush: BrushInterface
pen: PenInterface
text: str
font: FontInterface
background_brush: Optional[BrushInterface] = None
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.

render()[source]

Render the line to the scene.

__init__(pos: Point, parent: Optional[PositionedObjectInterface], scale: float, rotation: float, transform_origin: Point, brush: BrushInterface, pen: PenInterface, text: str, font: FontInterface, background_brush: Optional[BrushInterface] = None, clip_start_x: Optional[Unit] = None, clip_width: Optional[Unit] = None) None