Example #1
0
 private Repeater(string name, AnimatableFloatValue copies, AnimatableFloatValue offset, AnimatableTransform transform)
 {
     Name      = name;
     Copies    = copies;
     Offset    = offset;
     Transform = transform;
 }
 internal TransformKeyframeAnimation(AnimatableTransform animatableTransform)
 {
     _anchorPoint = animatableTransform.AnchorPoint.CreateAnimation();
     _position    = animatableTransform.Position.CreateAnimation();
     _scale       = animatableTransform.Scale.CreateAnimation();
     _rotation    = animatableTransform.Rotation.CreateAnimation();
     _opacity     = animatableTransform.Opacity.CreateAnimation();
 }
Example #3
0
 private Layer(IList <object> shapes, LottieComposition composition, string layerName, long layerId, LayerType layerType, long parentId, string refId, IList <Mask> masks, AnimatableTransform transform, int solidWidth, int solidHeight, Color solidColor, float timeStretch, float startProgress, int preCompWidth, int preCompHeight, IList <IKeyframe <float?> > inOutKeyframes, MatteType matteType)
 {
     _shapes        = shapes;
     _composition   = composition;
     Name           = layerName;
     Id             = layerId;
     _layerType     = layerType;
     ParentId       = parentId;
     RefId          = refId;
     Masks          = masks;
     Transform      = transform;
     SolidWidth     = solidWidth;
     SolidHeight    = solidHeight;
     SolidColor     = solidColor;
     TimeStretch    = timeStretch;
     StartProgress  = startProgress;
     PreCompWidth   = preCompWidth;
     PreCompHeight  = preCompHeight;
     InOutKeyframes = inOutKeyframes;
     _matteType     = matteType;
 }
Example #4
0
 private Layer(List <IContentModel> shapes, LottieComposition composition, string layerName, long layerId, LayerType layerType, long parentId, string refId, IList <Mask> masks, AnimatableTransform transform, int solidWidth, int solidHeight, Color solidColor, float timeStretch, float startProgress, int preCompWidth, int preCompHeight, AnimatableTextFrame text, AnimatableTextProperties textProperties, List <IKeyframe <float?> > inOutKeyframes, MatteType matteType, AnimatableFloatValue timeRemapping)
 {
     _shapes        = shapes;
     _composition   = composition;
     Name           = layerName;
     Id             = layerId;
     _layerType     = layerType;
     ParentId       = parentId;
     RefId          = refId;
     Masks          = masks;
     Transform      = transform;
     SolidWidth     = solidWidth;
     SolidHeight    = solidHeight;
     SolidColor     = solidColor;
     TimeStretch    = timeStretch;
     StartProgress  = startProgress;
     PreCompWidth   = preCompWidth;
     PreCompHeight  = preCompHeight;
     Text           = text;
     TextProperties = textProperties;
     InOutKeyframes = inOutKeyframes;
     _matteType     = matteType;
     TimeRemapping  = timeRemapping;
 }
Example #5
0
        internal ContentGroup(LottieDrawable lottieDrawable, BaseLayer layer, string name, List <IContent> contents, AnimatableTransform transform)
        {
            Name      = name;
            _contents = contents;

            if (transform != null)
            {
                _transformAnimation = transform.CreateAnimation();

                _transformAnimation.AddAnimationsToLayer(layer);
                _transformAnimation.ValueChanged += (sender, args) =>
                {
                    lottieDrawable.InvalidateSelf();
                };
            }

            var greedyContents = new List <IGreedyContent>();

            for (var i = contents.Count - 1; i >= 0; i--)
            {
                var content = contents[i];
                if (content is IGreedyContent greedyContent)
                {
                    greedyContents.Add(greedyContent);
                }
            }

            for (var i = greedyContents.Count - 1; i >= 0; i--)
            {
                greedyContents[i].AbsorbContent(_contents);
            }
        }