Exemplo n.º 1
0
 internal AnimatablePathValue(IJsonValue json, LottieComposition composition)
 {
     if (HasKeyframes(json))
     {
         var jsonArray = json.GetArray();
         var length    = jsonArray.Count;
         for (var i = 0; i < length; i++)
         {
             var jsonKeyframe = jsonArray[i].GetObject();
             var keyframe     = PathKeyframe.PathKeyframeFactory.NewInstance(jsonKeyframe, composition, ValueFactory.Instance);
             _keyframes.Add(keyframe);
         }
         Keyframe <PathKeyframe> .SetEndFrames <PathKeyframe, Vector2?>(_keyframes);
     }
     else
     {
         _initialPoint = JsonUtils.PointFromJsonArray(json.GetArray(), composition.DpScale);
     }
 }