Gradient Problems with teeCreateMetaFile?

TeeChart VCL for Borland/CodeGear/Embarcadero RAD Studio, Delphi and C++ Builder.
Post Reply
Pat Matthews
Newbie
Newbie
Posts: 1
Joined: Thu Dec 23, 2004 5:00 am
Location: Florida
Contact:

Gradient Problems with teeCreateMetaFile?

Post by Pat Matthews » Wed Mar 09, 2005 6:34 pm

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?

Pep
Site Admin
Site Admin
Posts: 3273
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Mar 21, 2005 5:04 pm

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 ?

Post Reply