Page 1 of 1

Gradient Problems with teeCreateMetaFile?

Posted: Wed Mar 09, 2005 6:34 pm
by 9340395
Here's a bizarre problem that I've been banging my head against for a while:

MF:=Chart.teeCreateMetaFile(True, Rect(0,0,NewWidth,NewHeight));
clipboard.assign(MF);
PlayEnhMetafile(TgtCanvas.Handle, MF.Handle, RectangleToPrintIn);

The metafile MF contains the correct gradient. I put that clipboard.assign call in there so I could check it. However, the gradient never gets drawn to TgtCanvas. The rest of the graph looks great - but no gradient.

Any ideas?

Posted: Mon Mar 21, 2005 5:04 pm
by Pep
Hi Pat,

what's TgtCanvas ? I'm able to see correct results on the Form.Canvas and also in the ClipBoard using your code (with v7.04) :

Code: Select all

begin
MF:=Chart1.teeCreateMetaFile(True, Rect(0,0,300,200));
clipboard.assign(MF);
PlayEnhMetafile(Form1.Canvas.Handle, MF.Handle, Rect(0,0,300,200));
end;
How can I reproduce the problem ?