UMD.HCIL.Piccolo.Activities.PColorActivity.SetRelativeTargetValue C# (CSharp) Method

SetRelativeTargetValue() public method

Overridden. See PInterpolatingActivity.SetRelativeTargetValue.
public SetRelativeTargetValue ( float zeroToOne ) : void
zeroToOne float
return void
		public override void SetRelativeTargetValue(float zeroToOne) {
			base.SetRelativeTargetValue (zeroToOne);
			int red = (int)Math.Round(source.R + (zeroToOne * (destination.R - source.R)));
			int green = (int)Math.Round(source.G + (zeroToOne * (destination.G - source.G)));
			int blue = (int)Math.Round(source.B + (zeroToOne * (destination.B - source.B)));
			int alpha = (int)Math.Round(source.A + (zeroToOne * (destination.A - source.A)));
			target.Color = Color.FromArgb(alpha, red, green, blue);
		}
		#endregion