Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Problems.GrammaticalOptimization/DynamicDataDisplay/Common/Palettes/PaletteBase.cs @ 12503

Last change on this file since 12503 was 12503, checked in by aballeit, 9 years ago

#2283 added GUI and charts; fixed MCTS

File size: 895 bytes
Line 
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  /// <summary>
10  /// Represents a simple base class for a palette. Contains an abstract merhod for creation of color and method to raise changed event.
11  /// </summary>
12  public abstract class PaletteBase : IPalette
13  {
14    #region IPalette Members
15
16    /// <summary>
17    /// Gets the color by interpolation coefficient.
18    /// </summary>
19    /// <param name="t">Interpolation coefficient, should belong to [0..1].</param>
20    /// <returns>Color.</returns>
21    public abstract Color GetColor(double t);
22
23    protected void RaiseChanged()
24    {
25      Changed.Raise(this);
26    }
27
28    /// <summary>
29    /// Occurs when palette changes.
30    /// </summary>
31    public event EventHandler Changed;
32
33    #endregion
34  }
35}
Note: See TracBrowser for help on using the repository browser.