mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2026-03-06 16:30:55 +00:00
Respect hidden property on strokes
This commit is contained in:
@@ -27,6 +27,7 @@ typedef enum : NSUInteger {
|
||||
|
||||
@property (nonatomic, readonly) NSString *keyname;
|
||||
@property (nonatomic, readonly) BOOL fillEnabled;
|
||||
@property (nonatomic, readonly) BOOL hidden;
|
||||
@property (nonatomic, readonly) LOTKeyframeGroup *color;
|
||||
@property (nonatomic, readonly) LOTKeyframeGroup *opacity;
|
||||
@property (nonatomic, readonly) LOTKeyframeGroup *width;
|
||||
|
||||
@@ -42,6 +42,11 @@
|
||||
return LOT_RemapValue(inValue, 0, 100, 0, 1);
|
||||
}];
|
||||
}
|
||||
|
||||
NSNumber *hidden = jsonDictionary[@"hd"];
|
||||
if (hidden.boolValue) {
|
||||
_hidden = true;
|
||||
}
|
||||
|
||||
_capType = [jsonDictionary[@"lc"] integerValue] - 1;
|
||||
_joinType = [jsonDictionary[@"lj"] integerValue] - 1;
|
||||
|
||||
@@ -74,10 +74,13 @@
|
||||
[self.containerLayer insertSublayer:fillRenderer.outputLayer atIndex:0];
|
||||
previousNode = fillRenderer;
|
||||
} else if ([item isKindOfClass:[LOTShapeStroke class]]) {
|
||||
LOTStrokeRenderer *strokRenderer = [[LOTStrokeRenderer alloc] initWithInputNode:previousNode
|
||||
if (((LOTShapeStroke *)item).hidden) {
|
||||
continue;
|
||||
}
|
||||
LOTStrokeRenderer *strokeRenderer = [[LOTStrokeRenderer alloc] initWithInputNode:previousNode
|
||||
shapeStroke:(LOTShapeStroke *)item];
|
||||
[self.containerLayer insertSublayer:strokRenderer.outputLayer atIndex:0];
|
||||
previousNode = strokRenderer;
|
||||
[self.containerLayer insertSublayer:strokeRenderer.outputLayer atIndex:0];
|
||||
previousNode = strokeRenderer;
|
||||
} else if ([item isKindOfClass:[LOTShapePath class]]) {
|
||||
LOTPathAnimator *pathAnimator = [[LOTPathAnimator alloc] initWithInputNode:previousNode
|
||||
shapePath:(LOTShapePath *)item];
|
||||
|
||||
Reference in New Issue
Block a user