neoscore.interface.image_interface

class neoscore.interface.image_interface.ImageInterface[source]

Bases: PositionedObjectInterface

Interface for images, including both pixmaps and SVGs.

Supported image extensions/formats include: BMP, GIF, JPG, JPEG, PNG, PBM, PGM, PPM, XBM, XPM, and SVG.

Scaling respects the image’s aspect ratio, and is performed using bilinear filtering.

file_path: pathlib.Path

Path to an image file to be used

opacity: float = 1

The image’s opacity, where 1 is fully opaque and 0 is invisible.

__init__(pos: Point, parent: Optional[PositionedObjectInterface], scale: float, rotation: float, transform_origin: Point, file_path: Path, opacity: float = 1) None
render()[source]

Render the object to the scene.

This is typically done by constructing a QGraphicsItem subclass and calling _register_qt_object with it. Do not manually assign the Qt object’s parent or add it to the Qt scene.