Class Corners
Represents the four document corners detected or set by consumers, preserving the SDK-specific ordering.
Namespace: ImageSdkWrapper Assembly: ImageSdkWrapper.MAUI
Inheritance: object
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)
Parameters
src(Corners): Source corners to duplicate.
Corners(PxlPoint, PxlPoint, PxlPoint, PxlPoint)
Creates an instance using the provided corners.
public Corners(PxlPoint ul, PxlPoint ur, PxlPoint bl, PxlPoint br)
Parameters
ul(PxlPoint): Upper-left corner.ur(PxlPoint): Upper-right corner.bl(PxlPoint): Bottom-left corner.br(PxlPoint): Bottom-right corner.
Corners(PxlPoint[])
Creates an instance from an array of four points in the documented order.
public Corners(PxlPoint[] points)
Parameters
points(PxlPoint[]): Array of exactly four points.
Method
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj(object): The object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int: A hash code for the current object.
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)
Parameters
corners(Corners): Source corners to clone.
Returns
- Corners
SetCorners(Corners)
Copies coordinates from another Corners instance.
public virtual void SetCorners(Corners src)
Parameters
src(Corners): Source corners.
SetCorners(PxlPoint[])
Replaces the internal points with the provided array when it contains exactly four coordinates.
public virtual void SetCorners(PxlPoint[] points)
Parameters
points(PxlPoint[]): Input array in SDK order.
ValidateCorners(PxlPoint)
Validates whether the corners lie within the given bounds using the native DocumentCutout validator.
public bool ValidateCorners(PxlPoint bounds)
Parameters
bounds(PxlPoint): Image bounds to validate against.
Returns
- bool:
truewhen the cutout is acceptable; otherwisefalse.
Property
IsInited
Indicates whether the structure has been initialised with non-default values.
public bool IsInited { get; }
Returns
- bool
Points
Gets the underlying corner array in order: upper-left, upper-right, bottom-left, bottom-right.
public PxlPoint[] Points { get; }
Returns
- PxlPoint[]