[Lazarus] Get JPEG from TAChart in CGI app

Michael Van Canneyt michael at freepascal.org
Tue Mar 22 23:18:19 CET 2011



On Wed, 23 Mar 2011, Alexander Klenin wrote:

> 2011/3/23 Leonardo M. Ramé <l.rame at griensu.com>:
>> Nevermind, it worked wonderfully.
>>
>> I attached your nogui example compiled as a CGI.
>
> Excellent.
> Now I just have to figure out how to draw text on FPCanvas...

You need the ftfont, freetype, freetypeh units. 
Then create a TFreetypeFont instance, assign to canvas.font, 
and call TextRect() or whatever you would call normally.

in the SVN of FPC, check directory tests/utils/testsuite, unit utests.

It is a CGI  webprogram that e.g. draws a pie chart and puts a legend on it using FPimagecanvas.


Michael.


More information about the Lazarus mailing list