1
0
mirror of https://github.com/danog/Telegram.git synced 2025-01-05 20:48:36 +01:00
Telegram/thirdparty/PGPhotoEditor/PGPhotoEditor.h

39 lines
1.3 KiB
C
Raw Normal View History

2015-10-01 18:19:52 +02:00
#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;
2016-02-25 01:03:51 +01:00
- (void)setImage:(UIImage *)image forCropRect:(CGRect)cropRect cropRotation:(CGFloat)cropRotation cropOrientation:(UIImageOrientation)cropOrientation fullSize:(bool)fullSize;
2015-10-01 18:19:52 +02:00
- (void)processAnimated:(bool)animated completion:(void (^)(void))completion;
- (void)createResultImageWithCompletion:(void (^)(UIImage *image))completion;
2016-02-25 01:03:51 +01:00
- (UIImage *)currentResultImage;
2015-10-01 18:19:52 +02:00
- (bool)needsImageRecropping;
- (bool)hasDefaultCropping;
- (SSignal *)histogramSignal;
- (id<TGMediaEditAdjustments>)exportAdjustments;
@end