Class Corners
Represents the four document corners detected or set by consumers, preserving the SDK-specific ordering.
public class Corners
Constructor
Corners()
Creates an instance with all coordinates zeroed.
public Corners()
Corners(Corners)
Creates a deep copy of the provided instance.
public Corners(Corners src)
Corners(PxlPoint, PxlPoint, PxlPoint, PxlPoint)
Creates an instance using the provided corners.
public Corners(PxlPoint ul, PxlPoint ur, PxlPoint bl, PxlPoint br)
Corners(PxlPoint[])
Creates an instance from an array of four points in the documented order.
public Corners(PxlPoint[] points)
Method
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Reset()
Sets all corner coordinates to zero.
public virtual void Reset()
SafeClone(Corners)
Creates a copy of the provided instance, returning null when corners is null.
public static Corners SafeClone(Corners corners)
SetCorners(Corners)
Copies coordinates from another Corners instance.
public virtual void SetCorners(Corners src)
SetCorners(PxlPoint[])
Replaces the internal points with the provided array when it contains exactly four coordinates.
public virtual void SetCorners(PxlPoint[] points)
ValidateCorners(PxlPoint)
Validates whether the corners lie within the given bounds using the native DocumentCutout validator.
public bool ValidateCorners(PxlPoint bounds)
Property
IsInited
Indicates whether the structure has been initialised with non-default values.
public bool IsInited { get; }
Points
Gets the underlying corner array in order: upper-left, upper-right, bottom-left, bottom-right.
public PxlPoint[] Points { get; }