neoscore.interface.positioned_object_interface
- class neoscore.interface.positioned_object_interface.PositionedObjectInterface[source]
Bases:
object
Interface for a generic graphic object.
All graphic interfaces for renderable objects should descend from this and also be immutable dataclasses.
- pos: Point
The position of the object.
If a parent is provided, this position is relative to that interface. Otherwise it is in absolute document coordinates.
- parent: Optional[PositionedObjectInterface]
The object’s parent, if any.
If a parent interface is provided, it must be rendered before this interface.
- scale: float
A scaling factor, where 1 is no scaling.
This occurs relative to
transform_origin
.Scaling is inherited from parents to children along the interface tree.
- rotation: float
Rotation angle in degrees, where 0 is no rotation.
This occurs relative to
transform_origin
.Rotation is inherited from parents to children along the interface tree.
- __init__(pos: Point, parent: Optional[PositionedObjectInterface], scale: float, rotation: float, transform_origin: Point) None