/*
 * This is one of the header files of Dynamsoft Capture Vision SDK - Document Normalizer module.
 *
 * Copyright © Dynamsoft Corporation. All rights reserved.
 */

#import <Foundation/Foundation.h>
#import <DynamsoftCaptureVisionBundle/DSIntermediateResultUnit.h>

@class DSCorner;

NS_ASSUME_NONNULL_BEGIN

/**
 * DSCornersUnit class represents an intermediate result unit whose type is corners.
 */
NS_SWIFT_NAME(CornersUnit)
@interface DSCornersUnit : DSIntermediateResultUnit
/**
 * An array of corners. It includes all corners that participate quadrilaterals assembling.
 */
- (nullable NSArray<DSCorner *> *)getCorners;

- (NSInteger)getCount;

- (nullable DSCorner *)getCorner:(NSInteger)index;

- (void)removeAllCorners;

- (NSInteger)removeCorner:(NSInteger)index;

- (NSInteger)addCorner:(DSCorner *)corner
 matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;

- (NSInteger)setCorner:(NSInteger)index
                corner:(DSCorner *)corner
 matrixToOriginalImage:(CGAffineTransform)matrixToOriginalImage;

@end

NS_ASSUME_NONNULL_END
