Hello,
I have a small problem. I am creating a pdf file from a bunch of teecharts (about 300 of them). Each tchart has about 20000 points on them. So what is happening, is that each metafile has 20,000 instructions from the drawPointer method. Adobe takes about 20 seconds to render each page (with about 10 plots per page). Its almost unuseable.
What I want to do is create the metafile as follows. Draw all legends, titles, text etc to the metafile so that the text comes out beautiful. Draw the plot values to a bitmap and then when all values are done, draw the bitmap to the metafile. That way I will have high resolution text, and have all the data points in bitmap.
Looking at your internal draw method, there does not seem to be an easy way to do this. the tPointSeries.DrawPointer method uses parentChart.canvas. There does not seem to be an easy place to pass in another canvas to draw the points on.
Do you guys have a suggestion of how I can easily accomplish this?
mixing metafiles and bitmaps
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
Hi Bert,
Thank you for the response, but this is not what I need.
I can calling TeeCreateMetafile. however, that creates a separate drawing instruction for every dot on the plot in the metafile. Which leads to huge metafiles that take a while to render.
I need to be able to call TeeCreateMetafile to create the metafile as usual, but then output the points in a bitmap that is embedded in the metafile.
Any ideas on this?
Thank you for the response, but this is not what I need.
I can calling TeeCreateMetafile. however, that creates a separate drawing instruction for every dot on the plot in the metafile. Which leads to huge metafiles that take a while to render.
I need to be able to call TeeCreateMetafile to create the metafile as usual, but then output the points in a bitmap that is embedded in the metafile.
Any ideas on this?
-
- Newbie
- Posts: 71
- Joined: Fri Jul 02, 2004 4:00 am
- Location: Culver City
- Contact:
Its a bit complicated, but what ended up working was putting in a fake bitmap canvas in the onBeforeDrawSeries so that when the series were being drawn, it drew to a bitmap. Then, I made a new event (changed the TChart source) to include an onAfterDrawAllSeries, where I then drew the bitmap into the metafile canvas and then put the charts canvas back to the metafile canvas.
I had to change the tchart source a bit to add the events and make a couple of protected methods public, but it works quite well..
I had to change the tchart source a bit to add the events and make a couple of protected methods public, but it works quite well..