Rev | Line | |
---|
[12503] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using System.Windows.Media;
|
---|
| 6 |
|
---|
| 7 | namespace 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.