[Lazarus] Get JPEG from TAChart in CGI app

Alexander Klenin klenin at gmail.com
Mon Mar 21 12:40:43 CET 2011


2011/3/21  <michael.vancanneyt at wisa.be>:

>>  Using widgetset is perhaps not the ideal solution, but the practical one,
>> given the contraints of existing tools.
>> Surely they may be improved, but that is not fast not easy to do.
> Correct. Unfortunately, no-one seems to be willing to take on the task :(

But I am willing, and doing it right now ;)

>> And while other paremeters (especially fonts) are not
>> required for bitmap, they are definitely required to draw a chart on it.
>> There are many ways to specify drawing parameters and primitives,
>> and using widgetset is quite valid way.
>
> Here I differ in opinion. If what you are saying is true, things like
> PostScript could never exist.
> And PHP makes very nice charts without screen.

Please do not conflate "screen" with "widgetset".

>> Now, the fact that a widgetset tries to access *screen* to create a bitmap
>> is a problem, I would even call it a bug, although I do not know if it is in GTK or LCL.
>
> I suppose the LCL, because most likely it asks some system metrics (DPI
> etc). The widgetset can only get them from the display...

That is a deficiency that could be fixed.

> Why ? As far as I know, all operations in LCL are present in fpImage.
> If some are missing, we can implement them.

For starters, the absence of following is most problematic:

Canvas.FillRect
Canvas.RadialPie
Font.Orientation

> Again, I don't claim it is easy, but I regret that everyone starting a set
> of components time and again takes the same road...

I did not start TAChart, but I do try to improve it's design.

> Well. Very likely I'll need charting in a web project of mine. At that time,
> I'll probably have to re-implement TAchart on top of TFPImage :(
>

If you implement the missing parts of FPCanvas,
there is a good chance you will not have to re-implement TAChart ;)


-- 
Alexander S. Klenin




More information about the Lazarus mailing list