Coordinate
Coordinate(value=None, unit=None, /, **data)A position on a timeline, defined by a value and unit.
Coordinates are immutable and support arithmetic operations when units match. They preserve the native numeric type (int, float, or Fraction) for precision.
Attributes
| Name | Type | Description |
|---|---|---|
| value | TimeScalarValue |
The numeric position (int, float, or Fraction). |
| unit | TimeUnit | The time unit (e.g., seconds, quarters, pixels). |
Examples
>>> c1 = Coordinate(120, TimeUnit.ticks)
>>> c2 = Coordinate(240, TimeUnit.ticks)
>>> c2 - c1
Duration(120, ticks)Methods
| Name | Description |
|---|---|
| with_timeline | Return an IdCoordinate carrying the given timeline id. |
with_timeline
Coordinate.with_timeline(timeline_id)Return an IdCoordinate carrying the given timeline id.