Peter d153fe0f21 Add 'submodules/LegacyComponents/' from commit 'd5594346161c1b7f203d1e87068bbe77bcaac019'
git-subtree-dir: submodules/LegacyComponents
git-subtree-mainline: 608630530451e02e5aec48389d144dbf7a3625b9
git-subtree-split: d5594346161c1b7f203d1e87068bbe77bcaac019
2019-06-11 18:51:15 +01:00

34 lines
1007 B
Objective-C

#import <UIKit/UIKit.h>
@class TGPainting;
@class TGPaintBrush;
@class TGPaintState;
@interface TGPaintCanvas : UIView
@property (nonatomic, strong) TGPainting *painting;
@property (nonatomic, readonly) TGPaintState *state;
@property (nonatomic, assign) CGRect cropRect;
@property (nonatomic, assign) UIImageOrientation cropOrientation;
@property (nonatomic, assign) CGSize originalSize;
@property (nonatomic, copy) bool (^shouldDrawOnSingleTap)(void);
@property (nonatomic, copy) bool (^shouldDraw)(void);
@property (nonatomic, copy) void (^strokeBegan)(void);
@property (nonatomic, copy) void (^strokeCommited)(void);
@property (nonatomic, copy) UIView *(^hitTest)(CGPoint point, UIEvent *event);
@property (nonatomic, copy) bool (^pointInsideContainer)(CGPoint point);
@property (nonatomic, readonly) bool isTracking;
- (void)draw;
- (void)setBrush:(TGPaintBrush *)brush;
- (void)setBrushWeight:(CGFloat)brushWeight;
- (void)setBrushColor:(UIColor *)color;
- (void)setEraser:(bool)eraser;
@end