Ejemplo n.º 1
0
        //获得图片
        public Image DrawImage(int Width, int Height)
        {
            foreach (Series series in tChart.Series)
            {
                series.CheckDataSource();
            }

            Steema.TeeChart.Export.BitmapFormat bitMap = tChart.Export.Image.Bitmap;
            bitMap.Height = Height;
            bitMap.Width  = Width;
            MemoryStream ms = new MemoryStream();

            bitMap.Save(ms);
            Image    img = Bitmap.FromStream(ms);
            Graphics g   = Graphics.FromImage(img);

            g.DrawRectangle(Pens.White, 0, 0, Width - 1, Height - 1);
            g.Dispose();

            return(img);
        }
Ejemplo n.º 2
0
        public Image Paint(int width, int height)
        {
            foreach (Series series in tChart.Series)
            {
                series.CheckDataSource();
            }

            Steema.TeeChart.Export.BitmapFormat bitMap = tChart.Export.Image.Bitmap;
            bitMap.Height = height;
            bitMap.Width  = width;
            MemoryStream ms = new MemoryStream();

            bitMap.Save(ms);
            Image    img = Bitmap.FromStream(ms);
            Graphics g   = Graphics.FromImage(img);

            g.SmoothingMode      = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
            g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality;
            g.DrawRectangle(Pens.White, 0, 0, width - 1, height - 1);
            g.Dispose();

            return(img);
        }