ConstrainPoint2D Struct
The ConstrainPoint2D typedef (https://w3c.github.io/mediacapture-image/#typedefdef-constrainpoint2d): a bare list of points, or an exact and an ideal list of points.
public readonly struct ConstrainPoint2D : IEquatable<ConstrainPoint2D>- Implements
Properties
| Name | Description |
|---|---|
| Bare | Gets the bare list of points when the union holds it, otherwise null. |
| Parameters | Gets the parameters when the union holds it, otherwise null. |
| Value | Gets the value of the union: Point2D[] or ConstrainPoint2DParameters. |
Gets the bare list of points when the union holds it, otherwise null.
public IReadOnlyList<Point2D>? Bare { get; }Property value
Parameters
MediaCaptureUnions.csGets the parameters when the union holds it, otherwise null.
public ConstrainPoint2DParameters? Parameters { get; }Property value
Gets the value of the union: Point2D[] or ConstrainPoint2DParameters.
public object Value { get; }Property value
Methods
| Name | Description |
|---|---|
| Equals(ConstrainPoint2D) | Indicates whether the current object is equal to another object of the same type. |
| Equals(object?) | Indicates whether this instance and a specified object are equal. |
| FromConstrainPoint2DParameters(ConstrainPoint2DParameters) | Creates the union from the parameters. |
| FromPoints(Point2D[]) | Creates the union from the bare list of points. |
| GetHashCode() | Returns the hash code for this instance. |
Equals overloads
Equals(ConstrainPoint2D)
MediaCaptureUnions.csIndicates whether the current object is equal to another object of the same type.
public bool Equals(ConstrainPoint2D other)Parameters
otherConstrainPoint2D- An object to compare with this object.
Returns
bool true if the current object is equal to the other parameter; otherwise, false.
Equals(object?)
MediaCaptureUnions.csFromConstrainPoint2DParameters(ConstrainPoint2DParameters)
MediaCaptureUnions.csCreates the union from the parameters.
public static ConstrainPoint2D FromConstrainPoint2DParameters(ConstrainPoint2DParameters value)FromPoints(Point2D[])
MediaCaptureUnions.csCreates the union from the bare list of points.
public static ConstrainPoint2D FromPoints(Point2D[] value)GetHashCode()
MediaCaptureUnions.csOperators
| Name | Description |
|---|---|
| operator ==(ConstrainPoint2D, ConstrainPoint2D) | Returns whether the two unions hold the same value. |
| implicit operator ConstrainPoint2D(ConstrainPoint2DParameters) | Creates the union from the parameters. |
| implicit operator ConstrainPoint2D(Point2D[]) | Creates the union from the bare list of points. |
| operator !=(ConstrainPoint2D, ConstrainPoint2D) | Returns whether the two unions hold different values. |
operator ==(ConstrainPoint2D, ConstrainPoint2D)
MediaCaptureUnions.csReturns whether the two unions hold the same value.
public static bool operator ==(ConstrainPoint2D left, ConstrainPoint2D right)op_Implicit overloads
implicit operator ConstrainPoint2D(ConstrainPoint2DParameters)
MediaCaptureUnions.csCreates the union from the parameters.
public static implicit operator ConstrainPoint2D(ConstrainPoint2DParameters value)implicit operator ConstrainPoint2D(Point2D[])
MediaCaptureUnions.csCreates the union from the bare list of points.
public static implicit operator ConstrainPoint2D(Point2D[] value)operator !=(ConstrainPoint2D, ConstrainPoint2D)
MediaCaptureUnions.csReturns whether the two unions hold different values.
public static bool operator !=(ConstrainPoint2D left, ConstrainPoint2D right)