//
//  SignatureDrawingView.h
//  UberSignature
//
//  Created by robin on 2019/1/23.
//  Copyright © 2019年 Uber. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <React/RCTComponent.h>

NS_ASSUME_NONNULL_BEGIN

@interface SignatureDrawingView : UIView

@property (nonatomic, copy) RCTBubblingEventBlock onSignatureImageCreated;
@property (nonatomic) NSInteger scaleToWidth;
@property (nonatomic) NSInteger minLineWidth;
@property (nonatomic) NSInteger maxLineWidth;
@property (nonatomic) BOOL isScaleImage;

- (instancetype)initWithImage:(nullable UIImage *)image;
/// Resets the signature
- (void)reset;

/// Returns a @c UIImage of the signature (with a transparent background).
- (UIImage *)fullSignatureImage;

/**
 Whether the signature drawing is empty or not.
 This changes when the user draws or the view is reset.
 @note Defaults to @c NO if there's a starting image.
 */
@property (nonatomic, readonly) BOOL isEmpty;

/**
 The color of the signature.
 Defaults to black.
 */

@property (nonatomic) UIColor *signatureColor;

@end

NS_ASSUME_NONNULL_END
