예제 #1
0
        public void DrawChartBase()
        {
            _timeSpan = _dataPoints.Length;

            _guiChartOptions = new GuiChartOptions(_axesNames, ChartType, ChartLines, TickMarks, Scale, _dataPoints, _timeSpan, RepDuration);
            _guiChart = new GuiChart("Title", new Vector2(1024, 780), Vector2.Zero, _guiChartOptions);
            _guiChart.LoadContent(_game, _contentManager, _spriteBatch);

            Texture2D testing = _guiChart.CreateChartTexture(_game, _contentManager, _spriteBatch);

            FileStream fs = File.Open(@"c:\school\ChartTexture.png", FileMode.Create);
            testing.SaveAsPng(fs, testing.Width, testing.Height);
            fs.Close();

            Assert.IsNotNull(testing);
            Assert.Pass("GuiChart.CreateChartTexture passed.");
        }