Ejemplo n.º 1
0
        /// <summary>
        /// Applies the provided keyframe to the control,
        /// overriding all needed properties
        /// </summary>
        /// <param name="frame"></param>
        public override void ApplyKeyFrame(KeyFrame startFrame, KeyFrame endFrame, float factor)
        {
            base.ApplyKeyFrame(startFrame, endFrame, factor);

            MaskLayout startLayout = startFrame != null ? startFrame.Layout as MaskLayout : null;
            MaskLayout endLayout   = endFrame != null ? endFrame.Layout as MaskLayout : null;

            if (startLayout == null && endLayout == null)
            {
                return;
            }

            float skew;

            if (endLayout == null)
            {
                skew = startLayout.Skew;
            }
            else
            {
                skew = startLayout.Skew * (1.0f - factor) + endLayout.Skew * factor;
            }

            this.Skew = skew;
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Clones the layout
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            MaskLayout layout = new MaskLayout();

            layout.SetFrom(this);

            layout.Skew = this.Skew;

            return(layout);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GUIMask()
 {
     Layout = new MaskLayout();
     Name = "Mask";
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Constructor
 /// </summary>
 public GUIMask()
 {
     Layout = new MaskLayout();
     Name   = "Mask";
 }
Ejemplo n.º 5
0
        /// <summary>
        /// Clones the layout
        /// </summary>
        /// <returns></returns>
        public override object Clone()
        {
            MaskLayout layout = new MaskLayout();
            layout.SetFrom(this);

            layout.Skew = this.Skew;

            return layout;
        }