[Lazarus] Get JPEG from TAChart in CGI app

Sven Barth pascaldragon at googlemail.com
Sun Mar 20 22:08:58 CET 2011


On 20.03.2011 21:21, Alexander Klenin wrote:
> On Mon, Mar 21, 2011 at 06:14, Leonardo M. Ramé<l.rame at griensu.com>  wrote:
>> Thanks for the explanation Alexander.
>>
>> Looking at the TChart.PaintOnCanvas method, I see you use a TCanvasDrawer class to draw over a TCanvas. I
>> think it shouldn't be too difficult to use a TFPImageCanvas when using
>> NoGui widgetset. What do you think?
>
> There are two problems here:
> 1) I suspect that the error you see is generated at the application
> startup, not when TChart tries to paint something.
> So to work around it, it is not enough to remove TCanvas in one place
> -- EVERY instance of TCanvas should be removed
> (so that Graphics unit is not used any more).
> Unfortunately, this is poses a serious compatibility hazard.
> 2) Even is the previous is possible (I believe it is, although difficult --
> TChart should be split into several classes in different units, with
> only the descendants depending on Graphics),
> TFPCanvas version it will still have serious limitations -- no TColor,
> no font orientation, etc.
>

Can it be that hard as TCanvas inherits from TFPCustomCanvas? (putting 
point 2 aside)

Regards,
Sven




More information about the Lazarus mailing list