コード例 #1
0
        Bitmap Example1(int width, int height, int count)
        {
            datasGen = new MockDatasGen(width, height);
            List <DataType> datas        = datasGen.CreateMockDatas(count);
            HeatMapImage    heatMapImage = new HeatMapImage(width, height, 200, 50);
            var             sw           = new Stopwatch();

            sw.Start();
            heatMapImage.SetDatas(datas);
            sw.Stop();
            textBox1.Text += $@"Set Data, TotalSeconds{sw.Elapsed.TotalSeconds}";
            textBox1.Text += Environment.NewLine;
            return(heatMapImage.GetHeatMap());
        }
コード例 #2
0
ファイル: Program.cs プロジェクト: lwh125630hui/HeatMapSharp
        static void Example1()
        {
            Console.WriteLine("Create some mock datas");
            datasGen = new MockDatasGen(WIDTH, HEIGHT);
            List <DataType> datas = datasGen.CreateMockDatas(100);

            Console.WriteLine("Set datas");
            HeatMapImage heatMapImage = new HeatMapImage(WIDTH, HEIGHT, 200, 50);

            heatMapImage.SetDatas(datas);

            Console.WriteLine("Calculate and generate heatmap");
            Bitmap img = heatMapImage.GetHeatMap();

            img.Save("..\\..\\..\\..\\Images\\heatmap1.png");
        }