[Lazarus] Get JPEG from TAChart in CGI app

Leonardo M. Ramé l.rame at griensu.com
Sun Mar 20 19:27:15 CET 2011


On 2011-03-21 03:58:12 +1000, Alexander Klenin wrote:
> On Mon, Mar 21, 2011 at 03:22, Leonardo M. Ramé <l.rame at griensu.com> 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.

-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list