Page 1 of 1

strange problem with teeCreateMetafile

Posted: Tue Apr 12, 2005 5:26 am
by 9338026
Hello,

I have a strange problem that is appearing. It only happens if I used a colorGrid with the rainbow palette. If I use my own palette it does not happen.

Basically, when I render the TChart to a PDF file, I first use TeeCreateMetafile and then paint that metafile onto the PDF. For the type of plot I describe above, I always get a black background on the picture in the PDF.

However, I use the same technique to print, except I render the PDF to a bitmap and then print the bitmap. If I do this on WinXP all is well. If I do this on win2k, the bitmap that goes to the print gets a black background.

The support staff at the pdf company (wptools) said the PDF problem is as a result of the pdf file not supporting ROP commands that were sent to it. Is it possible that win2k also does not support these when converting metafiles to bitmaps. Do you guys know where you would be doing this, and why it only happens with the rainbow palette.

Thanks,
Dave

Posted: Tue Apr 12, 2005 7:12 pm
by 9338026
I now have a clear way to reproduce this. If you create the metafile from TCHART and paste into Adobe illustrator 10, it makes a black background, even on Windows XP. Do you have any idea how to track down what in the metafile is causing this drawing error? Again, it only happens with a rainbow palette on a color grid.

Posted: Tue Apr 12, 2005 9:42 pm
by 9338026
The problem still exists, but I have resolved the issue by changing to a TPointSeries and using the RainbowPalette array to choose the colors. You may want to look into this for other people though. There seems to be something about how the colorgrid is generated that can cause problems with some applications.