GraphConstraints

References
Axis-lock and ratio constraints applied by a FunctionEditorBase on top of its current frame. Each field is nullable so "unset" means "no constraint on this dimension".

Constructors

GraphConstraints

#
public GraphConstraints(double ratio, Interval x, bool lockX, Interval y, bool lockY)
ratio (double)
x (Interval)
lockX (bool)
y (Interval)
lockY (bool)

GraphConstraints

#
public GraphConstraints(IReader reader)
reader (IReader)

Fields

LockX

#
public readonly bool LockX
Gets whether the domain of the graph editor is locked.

LockY

#
public readonly bool LockY
Gets whether the codomain of the graph editor is locked.

Ratio

#
public readonly double Ratio
Gets the ratio of pixels-per-unit on the X and Y axes. If both the domain and the codomain are locked, this ratio will be ignored.

X

#
public readonly Interval X
Gets the interval for the domain. If LockX is false, this may be ignored.

Y

#
public readonly Interval Y
Gets the interval for the codomain. If LockY is false, this may be ignored.

Properties

Default

#
public static GraphConstraints Default { get; }

Methods

Equals

#
public bool Equals(GraphConstraints other)
other (GraphConstraints)

Equals

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

GetHashCode

#
public override int GetHashCode()

Store

#
public void Store(IWriter writer)
writer (IWriter)
Store

WithCodomain

#
public GraphConstraints WithCodomain(Interval codomain, bool lockY)
codomain (Interval)
lockY (bool)

WithDomain

#
public GraphConstraints WithDomain(Interval domain, bool lockX)
domain (Interval)
lockX (bool)

WithLock

#
public GraphConstraints WithLock(bool lockX, bool lockY)
lockX (bool)
lockY (bool)

WithRatio

#
public GraphConstraints WithRatio(double ratio)
ratio (double)

Operators