Video Editing

This commit is contained in:
Ilya Laktyushin
2020-05-23 13:26:53 +03:00
parent 29b23c767f
commit 7741978b7e
131 changed files with 3072 additions and 631 deletions

View File

@@ -1,5 +1,8 @@
#import "TGPhotoTextEntityView.h"
#import "TGPaintSwatch.h"
#import "TGPhotoPaintFont.h"
#import "TGColor.h"
#import "LegacyComponentsInternal.h"
@@ -102,6 +105,20 @@ const CGFloat TGPhotoTextSelectionViewHandleSide = 30.0f;
return entity;
}
- (UIImage *)image {
CGRect rect = self.bounds;
UIGraphicsBeginImageContextWithOptions(CGSizeMake(rect.size.width, rect.size.height), false, 1.0f);
CGContextRef context = UIGraphicsGetCurrentContext();
[self drawViewHierarchyInRect:rect afterScreenUpdates:false];
UIImage *image = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return image;
}
- (bool)isEditing
{
return _textView.isFirstResponder;