mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
32 lines
816 B
Objective-C
32 lines
816 B
Objective-C
//
|
|
// LOTShapePath.m
|
|
// LottieAnimator
|
|
//
|
|
// Created by Brandon Withrow on 12/15/15.
|
|
// Copyright © 2015 Brandon Withrow. All rights reserved.
|
|
//
|
|
|
|
#import "LOTShapePath.h"
|
|
#import "LOTAnimatableShapeValue.h"
|
|
|
|
@implementation LOTShapePath
|
|
|
|
- (instancetype)initWithJSON:(NSDictionary *)jsonDictionary frameRate:(NSNumber *)frameRate {
|
|
self = [super init];
|
|
if (self) {
|
|
[self _mapFromJSON:jsonDictionary frameRate:frameRate];
|
|
}
|
|
return self;
|
|
}
|
|
|
|
- (void)_mapFromJSON:(NSDictionary *)jsonDictionary frameRate:(NSNumber *)frameRate {
|
|
_index = jsonDictionary[@"ind"];
|
|
_closed = [jsonDictionary[@"closed"] boolValue];
|
|
NSDictionary *shape = jsonDictionary[@"ks"];
|
|
if (shape) {
|
|
_shapePath = [[LOTAnimatableShapeValue alloc] initWithShapeValues:shape frameRate:frameRate closed:_closed];
|
|
}
|
|
}
|
|
|
|
@end
|