PageRenderTime 43ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/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
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows.Media;
  6. namespace Microsoft.Research.DynamicDataDisplay.Common.Palettes
  7. {
  8. public class TransparentLimitsPalette : DecoratorPaletteBase
  9. {
  10. public TransparentLimitsPalette() { }
  11. public TransparentLimitsPalette(IPalette palette) : base(palette) { }
  12. public override Color GetColor(double t)
  13. {
  14. if (t < 0 || t > 1) return Colors.Transparent;
  15. return Palette.GetColor(t);
  16. }
  17. }
  18. }