[Lazarus] Get JPEG from TAChart in CGI app

Alexander Klenin klenin at gmail.com
Sun Mar 20 20:27:49 CET 2011


On Mon, Mar 21, 2011 at 05:14, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> On 2011-03-21 04:54:45 +1000, Alexander Klenin wrote:
>> On Mon, Mar 21, 2011 at 04:44, Leonardo M. Ramé <l.rame at griensu.com> wrote:
>> >> 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?
>> >
>> > Yes, if I try to PaintOnCanvas of a TBitmap, for example. I get "Canvas
>> > does not allow drawing".
>>
>> That is very strange. I have created a nogui demo in r29942,
>> which does not have any gui, and creates a bitmap file with the chart.
>> Does it work for you?
>>
>
> It works when compiled with Gtk2 widgetset. If you set the nogui
> widgetset you'll get the "Canvas does not allow drawing error".

That is true.
You have to link you CGI app with some graphic widgetset,
which will unfortunately bloat an executable, but should otherwise work.

-- 
Alexander S. Klenin




More information about the Lazarus mailing list