DomainF

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

Constructors

DomainF

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

Properties

Lower

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

Max

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

Mid

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

Min

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

UnitsPerPixel

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

Upper

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

Methods

Equals

#
public bool Equals(
other
)

Equals

#
public override bool Equals(
obj
)
ValueType.Equals

GetHashCode

#
public override int GetHashCode()

Interpolate

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

IsVisible

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

Limit

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

Pan

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

ParameterAt

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

PixelAt

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

WithDomain

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

WithLimits

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

Zoom

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