/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
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Windows.Media;
-
- namespace Microsoft.Research.DynamicDataDisplay.Common.Palettes
- {
- public class TransparentLimitsPalette : DecoratorPaletteBase
- {
- public TransparentLimitsPalette() { }
-
- public TransparentLimitsPalette(IPalette palette) : base(palette) { }
-
- public override Color GetColor(double t)
- {
- if (t < 0 || t > 1) return Colors.Transparent;
- return Palette.GetColor(t);
- }
- }
- }