//
//  HYHAddImageView.h
//  HYHRotateScaleImageView
//
//  Created by huangyongheng on 2019/7/11.
//  Copyright © 2019 hyh. All rights reserved.
//

#import <UIKit/UIKit.h>

/** 四周拓展宽度, 用于放置控制按钮, 其实就是控制按钮宽度的一半 */
#define EditElement_Inset 12.0

NS_ASSUME_NONNULL_BEGIN


typedef NS_OPTIONS(NSUInteger, EditElementAction) {
    EditElementActionNone           = 1 << 0,
    EditElementActionClick          = 1 << 1,
    EditElementActionMove           = 1 << 2,
    EditElementActionDelete         = 1 << 3,
    EditElementActionFlip           = 1 << 4,
    EditElementActionScale          = 1 << 5,
    
    EditElementActionAll            = ~0UL
};

@interface HYHAddImageView : UIView

@property (nonatomic, strong, readonly) UIView *contentView;
/** 是否处于活跃状态 */
@property (nonatomic, assign) BOOL isEditing;

/** 点击视图时的block */
@property (nonatomic, copy) void(^setEditBlock)(void);
/** 删除视图block */
@property (nonatomic, copy) void(^removeViewBlock)(void);
// 开始缩放旋转
@property (nonatomic, copy, nullable) void(^beginMovingBlock)(void);
// 结束缩放旋转
@property (nonatomic, copy, nullable) void(^endMovingBlock)(void);

/// 支持的操作项
- (EditElementAction)supportEditActions;

/// 最小缩放比例
- (CGFloat)minimumScaleRatio;

@end

NS_ASSUME_NONNULL_END
