On Sun, 20 Mar 2011, Leonardo M. Ramé wrote:

On 2011-03-21 03:58:12 +1000, Alexander Klenin wrote:
On Mon, Mar 21, 2011 at 03:22, Leonardo M. Ramé <[email protected]> wrote:

   lCanvas.CopyRect(0,0,TFPCustomCanvas(lChart.Canvas),lRect);

After executing the method I'm getting "Control '' has no parent
window' at the CopyRect line. I'm sure there is another method to copy a
TCanvas to a TFPCustomCanvas.

Use Chart.PaintOnCanvas instead. See savedemo for an example.
Note that you must give it full TCanvas -- just TFPCanvas is not enough.


Yes, but, how can I use a TCanvas in a CGI app?

If I write:

Chart.PaintOnCanvas(TCanvas(lCanvas), Rect(0, 0, 100, 100));

I get an Access Violation.

Simply said: you can't.

The current TAChart is not suitable for a CGI application. It expects a GUI.

Michael.
--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to