[Lazarus] Get JPEG from TAChart in CGI app
Alexander Klenin
klenin at gmail.com
Sun Mar 20 19:38:46 CET 2011
2011/3/21 Michael Van Canneyt <michael at freepascal.org>:
>> 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.
Of course, since you are converting an object to the type it does not belong to.
You should create a TBitmap or another similar object.
Did you look at the savedemo as I proposed in a previous mail?
> Simply said: you can't.
> The current TAChart is not suitable for a CGI application. It expects a GUI.
Why do you think so?
TAChart should be prefectly capable of rendering on bitmap-based canvas.
--
Alexander S. Klenin
More information about the Lazarus
mailing list