1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-12 17:37:33 +01:00
Telegram/thirdparty/PGPhotoEditor/PGPhotoEditor.h
2016-02-25 01:03:51 +01:00

39 lines
1.3 KiB
Objective-C

#import <Foundation/Foundation.h>
#import <SSignalKit/SSignalKit.h>
@class TGPhotoEditorPreviewView;
@protocol TGMediaEditAdjustments;
@interface PGPhotoEditor : NSObject
@property (nonatomic, assign) CGSize originalSize;
@property (nonatomic, assign) CGRect cropRect;
@property (nonatomic, readonly) CGSize rotatedCropSize;
@property (nonatomic, assign) CGFloat cropRotation;
@property (nonatomic, assign) CGFloat cropLockedAspectRatio;
@property (nonatomic, assign) UIImageOrientation cropOrientation;
@property (nonatomic, weak) TGPhotoEditorPreviewView *previewOutput;
@property (nonatomic, readonly) NSArray *tools;
@property (nonatomic, readonly) bool processing;
@property (nonatomic, readonly) bool readyForProcessing;
- (instancetype)initWithOriginalSize:(CGSize)originalSize adjustments:(id<TGMediaEditAdjustments>)adjustments forVideo:(bool)forVideo;
- (void)setImage:(UIImage *)image forCropRect:(CGRect)cropRect cropRotation:(CGFloat)cropRotation cropOrientation:(UIImageOrientation)cropOrientation fullSize:(bool)fullSize;
- (void)processAnimated:(bool)animated completion:(void (^)(void))completion;
- (void)createResultImageWithCompletion:(void (^)(UIImage *image))completion;
- (UIImage *)currentResultImage;
- (bool)needsImageRecropping;
- (bool)hasDefaultCropping;
- (SSignal *)histogramSignal;
- (id<TGMediaEditAdjustments>)exportAdjustments;
@end