- class neoscore.core.spanner.Spanner
Mixin for a
PositionedObjectwith starting and ending anchors.
If the spanner is in a
Flowable, the endpoint must be in the same one. Likewise, if the spanner is not in one, the endpoint must not be in one either.
This mixin only provides a common interface for ending anchors. The starting position of this spanner should be the main object’s
PositionedObject.pos, and the starting anchor should be its
PositionedObject.parent. It is up to the implementing class to decide how to use this information.
Spanners are horizontal relative to their starting anchor. Arbitrary end-y positions can be set with
- __init__(end_x: Unit, end_parent: PositionedObject)
end_x – The X position of the endpoint.
end_parent – The parent of the endpoint.
end_xwill be relative to this object. This can be the spanner itself to make it relative to the starting point.
The y position of the endpoint.
This value is automatically computed such that the spanner is horizontal.
The x-axis length of the spanner.