DomainF

References
public readonly struct DomainF : IEquatable<DomainF>
A one-dimensional lens on a numeric interval.

Constructors

DomainF

#
public DomainF(float lower, float upper, double min, double max)
Create a new one-dimensional domain.
lower (float)
upper (float)
min (double)
max (double)

Properties

Lower

#
public float Lower { get; }
The position of the lower limit of the domain.

Max

#
public double Max { get; }
The upper bounds of the interval visible within the limits.

Mid

#
public double Mid { get; }
The middle of the visible interval.

Min

#
public double Min { get; }
The lower bound of the interval visible within the limits.

UnitsPerPixel

#
public double UnitsPerPixel { get; }
Gets the length (measured in underlying units) per logical pixel. I.e. |(Max-Min) / (Upper-Lower)|

Upper

#
public float Upper { get; }
The position of the upper limit of the domain.

Methods

Equals

#
public bool Equals(DomainF other)
other (DomainF)

Equals

#
public override bool Equals(object obj)
obj (object)
ValueType.Equals

GetHashCode

#
public override int GetHashCode()

Interpolate

#
public DomainF Interpolate(DomainF other, double factor)
Perform a linear interpolation between two frames.
other (DomainF)Target frame.
factor (double)Interpolation factor.
Interpolated frame.

IsVisible

#
public bool IsVisible(double parameter)
Gets whether a specific parameter is within the frame limits.
parameter (double)

Limit

#
public DomainF Limit(double softMin, double softMax, double hardMin, double hardMax)
Create a stretch which does not exceed the maximum zoom/pan levels in both directions.
softMin (double)Soft limit on the Min property.
softMax (double)Soft limit on the Max property.
hardMin (double)Hard limit on the Min property.
hardMax (double)Hard limit on the Max property.

Pan

#
public DomainF Pan(float motion)
Perform a panning operation on this stretch.
motion (float)Amount of panning motion.
Modified stretch.

ParameterAt

#
public double ParameterAt(float pixel)
Determines the parameter underneath the given linear pixel.
pixel (float)pixel coordinate.
Parameter under pixel.

PixelAt

#
public float PixelAt(double parameter)
Determines the pixel directly above the given parameter.
parameter (double)Parameter.
Pixel at parameter..

WithDomain

#
public DomainF WithDomain(double min, double max)
Modify the domain of this stretch.
min (double)
max (double)

WithLimits

#
public DomainF WithLimits(float lower, float upper)
Modify the limits of this stretch.
lower (float)
upper (float)

Zoom

#
public DomainF Zoom(float anchor, float motion)
Perform a zoom operation on this stretch.
anchor (float)Zooming anchor.
motion (float)Amount of zooming motion.
Modified stretch.