Esempio n. 1
0
        public static Shema GetDefault()
        {
            var shema = new Shema();

            var layer = new ShemaLayer { Shade = ShadeType.OnlyLand, Level = 0 };

            layer.Add(0, new UColor(0xFF000000));
            layer.Add(0x80 * 5, new UColor(0xFF483D8B));
            layer.Add(0x87 * 5, new UColor(0xFF8470FF));
            layer.Add(0x9A * 5, new UColor(0xFFEEDD82));
            layer.Add(0xBD * 5, new UColor(0xFF6B8E23));
            layer.Add(0xFF * 5, new UColor(0xFF000000));

            shema.Layers.Add(layer);

            layer = new ShemaLayer { Shade = ShadeType.None, Level = 1 };

            layer.Add(0, new UColor(0));
            layer.Add(0x60 * 5, new UColor(0));
            layer.Add(0x61 * 5, new UColor(0x20FFFFFF));
            layer.Add(0x88 * 5, new UColor(0xB0FFFFFF));
            layer.Add(0x98 * 5, new UColor(0xB0FFFFFF));
            layer.Add(0xD0 * 5, new UColor(0x20FFFFFF));
            layer.Add(0xD1 * 5, new UColor(0));
            layer.Add(0xFF * 5, new UColor(0));

            shema.Layers.Add(layer);

            return shema;
        }
        public ColorEditControl(ShemaLayer layer, ColorHeight height)
        {
            __Layer = layer;
            __ColorHeight = height;

            H = __ColorHeight.Heigth;

            InitializeComponent();
            DataContext = this;
        }
Esempio n. 3
0
        public static Shema GenerateRandom()
        {
            var container = new Shema();

            int layersCount = RandomHelper.Next(2);

            for (int i = 0; i <= layersCount; i++)
            {
                var layer = new ShemaLayer
                {
                    Shade = i == 0 ? RandomShadeType() : ShadeType.None,
                    Level = i
                };

                int levels = 2 + RandomHelper.Next((i == 0 ? 5 : 3));
                int prevH = 0;
                if (i % 2 == 0)
                {
                    for (int l = 0; l < levels; l++)
                    {
                        int curH = l == 0 ? 0 : RandomHelper.Next(200) + 1;
                        layer.Add(curH + prevH, new UColor(0xFF, (byte)RandomHelper.Next(256), (byte)RandomHelper.Next(256), (byte)RandomHelper.Next(256)));
                        prevH += curH;
                    }
                }
                else
                {
                    for (int l = 0; l < levels; l++)
                    {
                        int curH = l == 0 ? 0 : RandomHelper.Next(200) + 1;
                        layer.Add(curH + prevH, new UColor((byte)(RandomHelper.Next(200) + 5), (byte)RandomHelper.Next(256), (byte)RandomHelper.Next(256), (byte)RandomHelper.Next(256)));
                        prevH += curH;
                    }
                }

                container.Layers.Add(layer);
            }

            return container;
        }
Esempio n. 4
0
 private void UpdateLayer()
 {
     Layer = Layer;
 }
Esempio n. 5
0
        public static PlanetContainer GetDesert()
        {
            var result = new PlanetContainer { Name = "Desert" };

            var shema = new Shema();

            var layer = new ShemaLayer { Shade = ShadeType.OnlyLand, Level = 0 };

            layer.Add(0, new UColor(0xFFCD853F));
            layer.Add(250, new UColor(0xFFCD853F));
            layer.Add(500, new UColor(0xFFF4A460));
            layer.Add(627, new UColor(0xFF8B4513));
            layer.Add(1000, new UColor(0xFFDEB887));

            shema.Layers.Add(layer);

            layer = new ShemaLayer { Shade = ShadeType.None, Level = 1 };

            layer.Add(0, new UColor(0));
            layer.Add(400, new UColor(0x00FFFFFF));
            layer.Add(500, new UColor(0xD0FFDEAD));
            layer.Add(600, new UColor(0x00FFFFFF));
            layer.Add(700, new UColor(0xD0FFDEAD));
            layer.Add(800, new UColor(0x00FFFFFF));
            layer.Add(1000, new UColor(0));

            shema.Layers.Add(layer);

            result.Shema = shema;
            return result;
        }
Esempio n. 6
0
        public static PlanetContainer GetSun()
        {
            var result = new PlanetContainer { Name = "Sun" };

            var shema = new Shema();

            var layer = new ShemaLayer { Shade = ShadeType.None, Level = 0 };

            layer.Add(0, new UColor(0xFFFF0000));
            layer.Add(1000, new UColor(0xFFFFFF00));

            shema.Layers.Add(layer);

            result.Shema = shema;

            return result;
        }
Esempio n. 7
0
        public static PlanetContainer GetPandorica()
        {
            var result = new PlanetContainer { Name = "Pandorica" };

            var shema = new Shema();

            var layer = new ShemaLayer { Shade = ShadeType.OnlyLand, Level = 0 };

            layer.Add(0, new UColor(0xFF000000));
            layer.Add(0x80 * 5, new UColor(0xFF483D8B));
            layer.Add(0x87 * 5, new UColor(0xFF8470FF));
            layer.Add(0x9A * 5, new UColor(0xFFEEDD82));
            layer.Add(0xBD * 5, new UColor(0xFF6B8E23));
            layer.Add(0xFF * 5, new UColor(0xFF000000));

            shema.Layers.Add(layer);

            layer = new ShemaLayer { Shade = ShadeType.None, Level = 1 };

            layer.Add(0, new UColor(0));
            layer.Add(0x60 * 5, new UColor(0));
            layer.Add(0x61 * 5, new UColor(0x20FFFFFF));
            layer.Add(0x88 * 5, new UColor(0xB0FFFFFF));
            layer.Add(0x98 * 5, new UColor(0xB0FFFFFF));
            layer.Add(0xD0 * 5, new UColor(0x20FFFFFF));
            layer.Add(0xD1 * 5, new UColor(0));
            layer.Add(0xFF * 5, new UColor(0));

            shema.Layers.Add(layer);

            result.Shema = shema;

            return result;
        }
Esempio n. 8
0
        public static PlanetContainer GetIce()
        {
            var result = new PlanetContainer { Name = "Ice" };

            var shema = new Shema();

            var layer = new ShemaLayer { Shade = ShadeType.OnlyLand, Level = 0 };

            layer.Add(0, new UColor(0xFF000000));
            layer.Add(0x30, new UColor(0xFF1A1BAF));
            layer.Add(0x60 * 5, new UColor(0xFF00BBFF));
            layer.Add(0x80 * 5, new UColor(0xFF0000FF));
            layer.Add(0x91 * 5, new UColor(0xFF000000));
            layer.Add(0xC0 * 5, new UColor(0xFF5C5C9C));
            layer.Add(0xFF * 5, new UColor(0xFF8FAFFF));

            shema.Layers.Add(layer);
            result.Shema = shema;
            return result;
        }