Class ConstantBounds
Time range which is constant for each object to be processed.
Inheritance
ConstantBounds
Assembly: Melanchall.DryWetMidi.dll
public sealed class ConstantBounds : IBounds
Constructors
Initializes a new instance of the
ConstantBounds with the specified size
so time range will span for equal length to the left and to the right from time
to calculate bounds relative to.
Declaration
public ConstantBounds(ITimeSpan size)
Parameters
Type |
Name |
Description |
ITimeSpan |
size |
Size of the time range. The length of time range will be 2 * size . |
Exceptions
Initializes a new instance of the
ConstantBounds with the specified size of left
and right parts so time range will span for different length to the left and to the right from time
to calculate bounds relative to.
Declaration
public ConstantBounds(ITimeSpan leftSize, ITimeSpan rightSize)
Parameters
Type |
Name |
Description |
ITimeSpan |
leftSize |
Left part's size of the time range. |
ITimeSpan |
rightSize |
Right part's size of the time range. |
Exceptions
Type |
Condition |
ArgumentNullException |
One of the following errors occurred:
-
leftSize is null . -
rightSize is null .
|
Properties
Gets the size of left part of the time range represented by the current
ConstantBounds.
Declaration
public ITimeSpan LeftSize { get; }
Property Value
Gets the size of right part of the time range represented by the current
ConstantBounds.
Declaration
public ITimeSpan RightSize { get; }
Property Value
Methods
Gets minimum and maximum times in MIDI ticks for the current time range.
Declaration
public Tuple<long, long> GetBounds(long time, TempoMap tempoMap)
Parameters
Type |
Name |
Description |
long |
time |
Time bounds should be calculated relative to. |
TempoMap |
tempoMap |
Tempo map used to calculate bounds. |
Returns
Type |
Description |
Tuple<long, long> |
Pair where first item is minimum time and the second one is maximum time. |
Implements