/Main/src/DynamicDataDisplay/Common/Palettes/TransparentLimitsPalette.cs
C# | 21 lines | 18 code | 3 blank | 0 comment | 2 complexity | ab7db890a30dafeeecd3162a251cd51a MD5 | raw file
Possible License(s): CC-BY-SA-3.0
1using System; 2using System.Collections.Generic; 3using System.Linq; 4using System.Text; 5using System.Windows.Media; 6 7namespace Microsoft.Research.DynamicDataDisplay.Common.Palettes 8{ 9 public class TransparentLimitsPalette : DecoratorPaletteBase 10 { 11 public TransparentLimitsPalette() { } 12 13 public TransparentLimitsPalette(IPalette palette) : base(palette) { } 14 15 public override Color GetColor(double t) 16 { 17 if (t < 0 || t > 1) return Colors.Transparent; 18 return Palette.GetColor(t); 19 } 20 } 21}