Page 1 of 1

DrawToBitmap Issue in latest service release

Posted: Mon Dec 03, 2007 5:59 pm
by 9794096
Have there been any problems reported with the DrawToBitmap method in the latest (8 Nov 2007) service release for v3 in Visual Studio 2005?

Here is what I am seeing.

We had been running using v2 still and now have a release version of our app out and want to work on upgrading to v3 now that have time to test such a major change for us. We implemented our own double-buffering of sorts in our app so that we use DrawToBitmap to render the chart and then place the resulting image into a PictureBox control on our form. The TeeChart control remains hidden the entire time.

When I un-installed v2 and installed the Nov 8 release of v3, our images drawn using DrawToBitmap now display nothing at all. I wrote a small test app that I can upload for you that will show you what I am doing.

I uninstalled the latest v3 release and installed the v3 from July 27 (version 3.2.2763.26082 is what is shows for the number installed now) and the problem goes away. The bitmap that results from my DrawToBitmap call shows the graph exactly as I expected it to (and exactly how it used to show using v2).

Please let me know if this is a known issue or if you need me to upload my test application.

Thanks.
Aaron

Posted: Tue Dec 04, 2007 2:06 pm
by narcis
Hi Aaron,

Yes, there's a known issue when exporting TeeChart into an image in the latest maintenance release. This has been fixed and we expect to deliver a new maintenance release before the end of this week.

If you want us to test your example application with our current sources we will be glad to do so.

Posted: Tue Dec 04, 2007 2:20 pm
by 9794096
No need to test with my simple little test app.
It is good enough to know that you guys are aware of the issue and plan to have it fixed in the near future.

Thanks, as always, for the quick response.

Posted: Tue Dec 04, 2007 2:29 pm
by narcis
Hi Aaron,

You're very welcome!

Then you may be interested in being aware at this forum or subscribe to our RSS feed for the next release announcement.

Posted: Wed Dec 05, 2007 6:14 pm
by 9794096
Narcis,
I have some questions and concerns about some performance changes I have seen from .NET v2 to three different v3.2 versions (July, November and now the new Decemeber release).

Is there an email address/Private Message address that I can use to communicate some things I have seen related to performance?
I noticed that PMs have been disabled on these boards or I would have sent this info and the questions to you through a PM.

Thanks.
Aaron

Posted: Fri Dec 07, 2007 8:33 am
by narcis
Hi Aaron,

As far as I can see you are a Pro-Support subscriber. You can use the Pro-Support e-mail address or send your inquires to info at steema dot com.

Thanks in advance.

Posted: Thu Dec 13, 2007 6:42 pm
by 9794096
Using the new (December 5th Service Release) version of TeeChart .NET v3.2 I still am unable to get the DrawToBitmap method to work as it used to work.
Was that DrawToBitmap fix supposed to be in this service or release or will it appear in an upcoming fix set?

Posted: Fri Dec 14, 2007 12:40 pm
by narcis
Hi Aaron,

It is related to the manual double-buffering, that's why setting UseBuffer to false works ok, for example:

Code: Select all

			tChart1.Graphics3D.UseBuffer = false;
			tChart1.Invalidate();
			Rectangle rect = new Rectangle(0, 0, tChart1.Width, tChart1.Height);
			Bitmap bmp = new Bitmap(rect.Width, rect.Height);

			tChart1.DrawToBitmap(bmp, rect);
			//bmp.Save(@"C:\temp\chart.bmp");
			pictureBox1.Image = bmp;
Other options:

Code: Select all

			Rectangle rect = new Rectangle(0, 0, tChart1.Width, tChart1.Height);
			Bitmap bmp = new Bitmap(rect.Width, rect.Height);
			Graphics g = Graphics.FromImage(bmp);
			tChart1.Graphics3D.BackBuffer.Render(g);
			//bmp.Save(@"C:\temp\chart1.bmp");
			pictureBox1.Image = bmp;
or:

Code: Select all

			Bitmap bmp = tChart1.Bitmap;
			pictureBox1.Image = bmp;