예제 #1
0
        public TransitionRange GetTransposeRange(ElementTransform trans)
        {
            TransitionRange tr = null;

            Ranges.TryGetValue(trans, out tr);
            return(tr);
        }
예제 #2
0
 public TransitionRange(TransitionLine line, ElementTransform trans)
 {
     ParentLine = line;
     OwnerTrans = trans;
     CurFocusRangeOptPart = BodyOperationPart.Nothing;
     UseFrameRectProjectingEffect = true;
 }
예제 #3
0
 public override bool Split(float time, out ElementTransform trans)
 {
     if (!base.Split(time, out trans))
     {
         return(false);
     }
     return(true);
 }
        public override void Merge(ElementTransform trans)
        {
            base.Merge(trans);
            var t = trans as ElementTransform_Scale;

            if (t != null)
            {
                m_Scale += t.Scale;
            }
        }
        public override void Merge(ElementTransform trans)
        {
            base.Merge(trans);
            var t = trans as ElementTransform_Rotation;

            if (t != null)
            {
                m_Angle += t.Angle;
            }
        }
        public override void Merge(ElementTransform trans)
        {
            base.Merge(trans);
            var t = trans as ElementTransform_Alpha;

            if (t != null)
            {
                m_Alpha += t.Alpha;
            }
        }
        public override bool CopyFrom(ElementTransform trans)
        {
            if (!base.CopyFrom(trans))
            {
                return(false);
            }
            var t = trans as ElementTransform_Scale;

            Scale = t.Scale;
            return(true);
        }
        public override bool CopyFrom(ElementTransform trans)
        {
            if (!base.CopyFrom(trans))
            {
                return(false);
            }
            var t = trans as ElementTransform_Alpha;

            Alpha = t.Alpha;
            return(true);
        }
예제 #9
0
        public override bool CopyFrom(ElementTransform trans)
        {
            if (!base.CopyFrom(trans))
            {
                return(false);
            }
            var t = trans as ElementTransform_Hidden;

            IsHidden = t.IsHidden;
            return(true);
        }
        public override bool CopyFrom(ElementTransform trans)
        {
            if (!base.CopyFrom(trans))
            {
                return(false);
            }
            var t = trans as ElementTransform_Rotation;

            Angle = t.Angle;
            return(true);
        }
        public override bool CopyFrom(ElementTransform trans)
        {
            if (!base.CopyFrom(trans))
            {
                return(false);
            }
            var t = trans as ElementTransform_Move;

            Offset = t.Offset;
            return(true);
        }
예제 #12
0
 public virtual bool CopyFrom(ElementTransform trans)
 {
     if (Kind != trans.Kind)
     {
         return(false);
     }
     //ParentElement = trans.ParentElement;
     //TimeBegin = trans.TimeBegin;
     TimeLength = trans.TimeLength;
     //PrevTrans = null;
     //NextTrans = null;
     return(true);
 }
        public override bool Split(float time, out ElementTransform trans)
        {
            TransPercentResult rst;
            float percent = GetTimePercent(time, out rst);

            if (!base.Split(time, out trans))
            {
                return(false);
            }
            var etrans = trans as ElementTransform_Rotation;

            etrans.Angle = (int)(percent * Angle);
            return(true);
        }
        public override void Merge(ElementTransform trans)
        {
            base.Merge(trans);
            var t = trans as ElementTransform_Move;

            if (t != null)
            {
                var offset1 = Offset;
                var offset2 = t.Offset;
                offset1.X += offset2.X;
                offset1.Y += offset2.Y;
                Offset     = offset1;
            }
        }
        public override bool Split(float time, out ElementTransform trans)
        {
            TransPercentResult rst;
            float percent = GetTimePercent(time, out rst);

            if (!base.Split(time, out trans))
            {
                return(false);
            }
            var etrans = trans as ElementTransform_Move;
            int dx     = (int)(percent * Offset.X);
            int dy     = (int)(percent * Offset.Y);

            etrans.Offset = new System.Drawing.Point(dx, dy);
            return(true);
        }
        public override bool Split(float time, out ElementTransform trans)
        {
            TransPercentResult rst;
            float percent = GetTimePercent(time, out rst);

            if (!base.Split(time, out trans))
            {
                return(false);
            }
            var etrans = trans as ElementTransform_Scale;
            int dw     = (int)(percent * Scale.Width);
            int dh     = (int)(percent * Scale.Height);

            etrans.Scale = new System.Drawing.SizeF(dw, dh);
            return(true);
        }
예제 #17
0
 public virtual bool Split(float time, out ElementTransform trans)
 {
     trans = null;
     if (!ContainTime(time))
     {
         return(false);
     }
     trans            = System.Activator.CreateInstance(TransTypes[Kind], ParentElement) as ElementTransform;
     trans.PrevTrans  = PrevTrans;
     trans.NextTrans  = this;
     trans.TimeBegin  = TimeBegin;
     trans.TimeLength = time - TimeBegin;
     TimeLength       = TimeEnd - time;
     TimeBegin        = time;
     ParentElement.AddTransition(trans);
     return(true);
 }
예제 #18
0
        public virtual bool RemoveTimeKey(float time, out ElementTransform transRemoved)
        {
            transRemoved = ParentDrawer.BindedElement.GetTransitionOnTime(Kind, time, false);
            if (transRemoved == null)
            {
                return(false);
            }
            float length = transRemoved.TimeLength;

            ParentDrawer.BindedElement.RemoveTransition(transRemoved);
            var transBefore = ParentDrawer.BindedElement.GetTransitionOnTime(Kind, time, true);

            if (transBefore != null)
            {
                transBefore.TimeLength += length;
            }
            return(true);
        }
예제 #19
0
 public virtual void Merge(ElementTransform trans)
 {
     TimeBegin   = trans.TimeBegin;
     TimeLength += trans.TimeLength;
 }