[Lazarus] Get JPEG from TAChart in CGI app

michael.vancanneyt at wisa.be michael.vancanneyt at wisa.be
Mon Mar 21 13:08:33 CET 2011



On Mon, 21 Mar 2011, Alexander Klenin wrote:

> 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 ;)

Glad to hear it :)

>
>>> 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".

In my opinion "No screen => no 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

FillRect and RadialPie can be solved easily. The Font.Orientation can be
added as a property, I would have to look at FreeType to see how it can be
implemented. Consider it on the todo list. I can add the missing 
properties/methods quickly, their implementations may take slightly longer
:-)


>
>> 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.

Great =-)

>
>> 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 ;)

I will try to do so ASAP.

Michael.




More information about the Lazarus mailing list