mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
26 lines
653 B
Objective-C
26 lines
653 B
Objective-C
#import "TGPhotoMaskPosition.h"
|
|
|
|
#import "LegacyComponentsInternal.h"
|
|
#import "TGDocumentAttributeSticker.h"
|
|
|
|
@implementation TGPhotoMaskPosition
|
|
|
|
+ (instancetype)maskPositionWithCenter:(CGPoint)center scale:(CGFloat)scale angle:(CGFloat)angle
|
|
{
|
|
TGPhotoMaskPosition *maskPosition = [[TGPhotoMaskPosition alloc] init];
|
|
maskPosition->_center = center;
|
|
maskPosition->_scale = scale;
|
|
maskPosition->_angle = angle;
|
|
return maskPosition;
|
|
}
|
|
|
|
+ (TGPhotoMaskAnchor)anchorOfMask:(TGStickerMaskDescription *)mask
|
|
{
|
|
if (mask == nil || mask.n >= TGPhotoMaskAnchorChin)
|
|
return TGPhotoMaskAnchorNone;
|
|
|
|
return mask.n + 1;
|
|
}
|
|
|
|
@end
|