Skip to content

Commit

Permalink
Implement more things in viewer, improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
ZehMatt committed Aug 21, 2024
1 parent d6de0be commit a68e1ba
Show file tree
Hide file tree
Showing 12 changed files with 572 additions and 180 deletions.
246 changes: 123 additions & 123 deletions Viewer/ColorTable.cs
Original file line number Diff line number Diff line change
@@ -1,155 +1,154 @@
using System;
using System.Drawing;
using System.Drawing;

namespace WalkerSim.Viewer
{
internal static class ColorTable
{
public static System.Drawing.Color[] Colors =
{
Color.AliceBlue,
Color.AntiqueWhite,
Color.Aqua,
Color.Aquamarine,
Color.Azure,
Color.Beige,
Color.Bisque,
Color.BlanchedAlmond,
Color.White,
Color.Red,
Color.Cyan,
Color.Yellow,
Color.Blue,
Color.BlueViolet,
Color.Green,
Color.Magenta,
Color.Lime,
Color.Navy,
Color.Orange,
Color.Purple,
Color.Aqua,
Color.Maroon,
Color.Gray,
Color.Pink,
Color.Gold,
Color.Violet,
Color.Turquoise,
Color.Olive,
Color.DarkOrange,
Color.MediumSpringGreen,
Color.Brown,
Color.BurlyWood,
Color.CadetBlue,
Color.RoyalBlue,
Color.Chartreuse,
Color.Chocolate,
Color.Tomato,
Color.SkyBlue,
Color.Indigo,
Color.Coral,
Color.CornflowerBlue,
Color.Cornsilk,
Color.Crimson,
Color.Cyan,
Color.DarkBlue,
Color.DarkCyan,
Color.DarkGoldenrod,
Color.DarkGray,
Color.DarkRed,
Color.LightSeaGreen,
Color.OrangeRed,
Color.SaddleBrown,
Color.LightPink,
Color.MediumVioletRed,
Color.SpringGreen,
Color.DarkOrchid,
Color.Tan,
Color.DarkGreen,
Color.DarkKhaki,
Color.Lavender,
Color.DarkBlue,
Color.Orange,
Color.HotPink,
Color.ForestGreen,
Color.MidnightBlue,
Color.LightYellow,
Color.DarkViolet,
Color.DarkSlateBlue,
Color.PowderBlue,
Color.Goldenrod,
Color.Teal,
Color.DarkMagenta,
Color.DarkOliveGreen,
Color.DarkOrange,
Color.DarkOrchid,
Color.DarkRed,
Color.DarkSalmon,
Color.MediumTurquoise,
Color.Fuchsia,
Color.Beige,
Color.DarkCyan,
Color.LightCoral,
Color.AliceBlue,
Color.Crimson,
Color.LightSlateGray,
Color.Sienna,
Color.LightSkyBlue,
Color.MistyRose,
Color.BlanchedAlmond,
Color.MediumBlue,
Color.SandyBrown,
Color.DeepSkyBlue,
Color.CadetBlue,
Color.AntiqueWhite,
Color.Peru,
Color.PaleVioletRed,
Color.MediumAquamarine,
Color.Bisque,
Color.RosyBrown,
Color.CornflowerBlue,
Color.LemonChiffon,
Color.MediumOrchid,
Color.DarkSeaGreen,
Color.DarkSlateBlue,
Color.LawnGreen,
Color.DarkGoldenrod,
Color.Aquamarine,
Color.DarkSlateGray,
Color.DarkTurquoise,
Color.DarkViolet,
Color.DeepPink,
Color.DeepSkyBlue,
Color.DimGray,
Color.DodgerBlue,
Color.Firebrick,
Color.FloralWhite,
Color.ForestGreen,
Color.Fuchsia,
Color.Gainsboro,
Color.GhostWhite,
Color.Gold,
Color.Goldenrod,
Color.Gray,
Color.Green,
Color.GreenYellow,
Color.Honeydew,
Color.HotPink,
Color.IndianRed,
Color.Indigo,
Color.Ivory,
Color.Khaki,
Color.Lavender,
Color.LavenderBlush,
Color.LawnGreen,
Color.LemonChiffon,
Color.DeepPink,
Color.Snow,
Color.GhostWhite,
Color.BurlyWood,
Color.DarkGray,
Color.MediumPurple,
Color.Wheat,
Color.NavajoWhite,
Color.DarkKhaki,
Color.Salmon,
Color.SeaGreen,
Color.PeachPuff,
Color.Moccasin,
Color.PaleGreen,
Color.LightBlue,
Color.LightCoral,
Color.LightCyan,
Color.Cornsilk,
Color.Thistle,
Color.LightGoldenrodYellow,
Color.LightGreen,
Color.MintCream,
Color.PapayaWhip,
Color.LightSteelBlue,
Color.Azure,
Color.Gainsboro,
Color.LightGray,
Color.LightPink,
Color.LightCyan,
Color.Ivory,
Color.LightGreen,
Color.IndianRed,
Color.SlateBlue,
Color.LightSalmon,
Color.LightSeaGreen,
Color.LightSkyBlue,
Color.LightSlateGray,
Color.LightSteelBlue,
Color.LightYellow,
Color.Lime,
Color.LimeGreen,
Color.Linen,
Color.Magenta,
Color.Maroon,
Color.MediumAquamarine,
Color.MediumBlue,
Color.MediumOrchid,
Color.MediumPurple,
Color.MediumSeaGreen,
Color.MediumSlateBlue,
Color.MediumSpringGreen,
Color.MediumTurquoise,
Color.MediumVioletRed,
Color.MidnightBlue,
Color.MintCream,
Color.MistyRose,
Color.Moccasin,
Color.NavajoWhite,
Color.Navy,
Color.OldLace,
Color.Olive,
Color.OliveDrab,
Color.Orange,
Color.OrangeRed,
Color.Orchid,
Color.PaleGoldenrod,
Color.PaleGreen,
Color.MediumSeaGreen,
Color.DodgerBlue,
Color.DarkOliveGreen,
Color.PaleTurquoise,
Color.PaleVioletRed,
Color.PapayaWhip,
Color.PeachPuff,
Color.Peru,
Color.Pink,
Color.Plum,
Color.PowderBlue,
Color.Purple,
Color.Red,
Color.RosyBrown,
Color.RoyalBlue,
Color.SaddleBrown,
Color.Salmon,
Color.SandyBrown,
Color.SeaGreen,
Color.SteelBlue,
Color.YellowGreen,
Color.SeaShell,
Color.Sienna,
Color.PaleGoldenrod,
Color.Silver,
Color.SkyBlue,
Color.SlateBlue,
Color.SlateGray,
Color.Snow,
Color.SpringGreen,
Color.SteelBlue,
Color.Tan,
Color.Teal,
Color.Thistle,
Color.Tomato,
Color.Turquoise,
Color.Honeydew,
Color.OliveDrab,
Color.Khaki,
Color.RoyalBlue,
Color.Firebrick,
Color.Violet,
Color.Wheat,
Color.White,
Color.WhiteSmoke,
Color.Yellow,
Color.YellowGreen,
Color.SlateGray,
Color.MediumOrchid,
Color.DarkOrange,
Color.Crimson,
Color.RosyBrown,
Color.RoyalBlue,
Color.Cornsilk,
Color.Coral,
Color.Azure,
};

static ColorTable()
{
#if false
// Shuffle the table.
var prng = new Random(1);
for (int i = 0; i < Colors.Length; i++)
Expand All @@ -160,11 +159,12 @@ static ColorTable()
Colors[idx1] = Colors[idx2];
Colors[idx2] = temp;
}
#endif
}

public static Color GetColorForIndex(int index)
{
return Colors[index % Colors.Length];
}
}
}
}
Loading

0 comments on commit a68e1ba

Please sign in to comment.