internal void CreatePath()
        {
            var equals = EndValue != null && StartValue != null && StartValue.Equals(EndValue.Value);

            if (EndValue != null && !equals)
            {
                Path = Utils.Utils.CreatePath(StartValue.Value, EndValue.Value, _pointKeyFrame.PathCp1, _pointKeyFrame.PathCp2);
            }
        }
示例#2
0
        public PathKeyframe(LottieComposition composition, Keyframe <Vector2?> keyframe)
            : base(composition, keyframe.StartValue, keyframe.EndValue, keyframe.Interpolator, keyframe.StartFrame, keyframe.EndFrame)
        {
            var equals = EndValue != null && StartValue != null && StartValue.Equals(EndValue.Value);

            if (EndValue != null && !equals)
            {
                Path = Utils.Utils.CreatePath(StartValue.Value, EndValue.Value, keyframe.PathCp1, keyframe.PathCp2);
            }
        }
示例#3
0
        public bool Equals(IndexRange other)
        {
            if (IsNull && other.IsNull)
            {
                return(true);
            }
            if (IsNull && !other.IsNull)
            {
                return(false);
            }
            if (!IsNull && other.IsNull)
            {
                return(false);
            }

            return(StartValue.Equals(other.StartValue) &&
                   EndValue.Equals(other.EndValue) &&
                   StartOffset == other.StartOffset &&
                   EndOffset == other.EndOffset);
        }
示例#4
0
        /// <summary>
        /// 判断是否值相等
        /// </summary>
        /// <param name="obj"></param>
        /// <returns>值相等,返回true</returns>
        public override bool Equals(object obj)
        {
            bool result = false;
            FromStartValueToEndValueReadEvent <TValue> other = obj as FromStartValueToEndValueReadEvent <TValue>;

            result = object.ReferenceEquals(this, other) || (base.Equals(obj) && other != null && StartValue.Equals(other.StartValue) && EndValue.Equals(other.EndValue));

            return(result);
        }