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 | /// Contains some predefined linear palettes.
|
---|
11 | /// </summary>
|
---|
12 | public static class LinearPalettes
|
---|
13 | {
|
---|
14 | private const double geoHeight = 8845 + 400;
|
---|
15 | private static LinearPalette geoHeightsPalette = new LinearPalette(
|
---|
16 | Color.FromRgb(1, 99, 69), Colors.White,
|
---|
17 | new LinearPaletteColorStep(Color.FromRgb(28, 128, 52), (50 + 400) / geoHeight),
|
---|
18 | new LinearPaletteColorStep(Color.FromRgb(229, 209, 119), (200 + 400) / geoHeight),
|
---|
19 | new LinearPaletteColorStep(Color.FromRgb(160, 66, 1), (1000 + 400) / geoHeight),
|
---|
20 | new LinearPaletteColorStep(Color.FromRgb(129, 32, 32), (2000 + 400) / geoHeight),
|
---|
21 | new LinearPaletteColorStep(Color.FromRgb(119, 119, 119), (4000 + 400) / geoHeight),
|
---|
22 | new LinearPaletteColorStep(Color.FromRgb(244, 244, 244), (6000 + 400) / geoHeight));
|
---|
23 |
|
---|
24 | /// <summary>
|
---|
25 | /// Gets the palette for geo height map visualization.
|
---|
26 | /// </summary>
|
---|
27 | /// <value>The geo heights palette.</value>
|
---|
28 | public static LinearPalette GeoHeightsPalette { get { return geoHeightsPalette; } }
|
---|
29 | }
|
---|
30 | }
|
---|