/// <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; }
/// <summary> /// Clones the layout /// </summary> /// <returns></returns> public override object Clone() { MaskLayout layout = new MaskLayout(); layout.SetFrom(this); layout.Skew = this.Skew; return(layout); }
/// <summary> /// Constructor /// </summary> public GUIMask() { Layout = new MaskLayout(); Name = "Mask"; }
/// <summary> /// Clones the layout /// </summary> /// <returns></returns> public override object Clone() { MaskLayout layout = new MaskLayout(); layout.SetFrom(this); layout.Skew = this.Skew; return layout; }