Esempio n. 1
0
        public override Rect lerp(float t)
        {
            if (_dirty)
            {
                _initialize();
            }

            if (t == 0.0)
            {
                return(begin);
            }

            if (t == 1.0)
            {
                return(end);
            }

            Offset center = _centerArc.lerp(t);
            float  width  = MathUtils.lerpNullableFloat(begin.width, end.width, t);
            float  height = MathUtils.lerpNullableFloat(begin.height, end.height, t);

            return(Rect.fromLTWH(
                       (center.dx - width / 2.0f),
                       (center.dy - height / 2.0f),
                       width,
                       height));
        }
Esempio n. 2
0
        public override Rect lerp(float t)
        {
            if (_dirty)
            {
                _initialize();
            }

            if (t == 0.0)
            {
                return(begin);
            }

            if (t == 1.0)
            {
                return(end);
            }

            return(Rect.fromPoints(_beginArc.lerp(t), _endArc.lerp(t)));
        }