[fpc-devel] graph module
Tomas Hajny
XHajT03 at mbox.vol.cz
Fri Mar 9 13:46:34 CET 2007
Daniƫl Mantione wrote:
> Op Fri, 9 Mar 2007, schreef Evgeniy Ivanov:
Hi Evgeniy,
>> I tried to use freepascal' graph module based on svgalib but from my
>> point of
>> view it's not comfortable: I need root prevelege or to remember what to
>> do
>> with *ids (uid and so on). Also I have a problems with konsole after
>> starting
>> programm with graph module: there is an error with input and I get much
>> garbage inside it.
>> I realize a test module with a few graph functions (for my needs) via
>> SDLlib.
>> I wrote it on C, but some code may be written on pascal. It's not bad
>> and
>> fully compotable with traditional graph module code. I have some
>> problems, but
>> I will solve them (SDL don't want to return 'keydowns'). If you like it
>> I may
>> realize a full and normal graph module.
>> Test programm need to be started in the terminal (console). You need to
>> push
>> the key only after setting up the terminal window active. I start in in
>> konsole. If you start it from GUI in will run and then the window will
>> close
>> its self. In the tar there is linux binary.
>>
>> Here the test ptogramm and simple graph module:
>> http://itmo.vingrad.ru/testGraph.tar.bz2
>
> It is in the planning to rewrite Graph on top of PTCPas. I hope to do this
> before 2.2 it released. In the meantime ggigraph might suit your needs.
>
> Implementing graph on top of SDL might also be an idea, but it should then
> be built on top of JEDI-SDL, and reuse the existing graph
> code. Implementing graph in C seems like a bad idea to me.
I'd say that having Graph built on top of SDL would be quite useful. I
agree with Daniel that implementation in Pascal would be much better
choice - among others, one could use it on various platforms without
having to compile C libraries on those platforms (SDL is available on
quite a few of them). I believe that Daniel intended to rewrite Graph to
use a "driver" system (similarly to what we use for threading,
keyboard/video/mouse units, heap management etc.), which would allow
people to use the same Graph functionalities supported by different
back-ends and choose either at compile time or possibly even at run time
which back-end should be used (as an example, svgalib could be used as
backup option for systems not running X11, etc.).
I personally wouldn't necessarily wait for PTCPas based implementation -
if Daniel wants to use the driver system, it should be enough to agree on
the driver interface, anything else can be done completely independently.
If you implement Graph as a completely independent implementation, you
could add it to contributed units (see our WWW pages), so anybody else can
use it.
If you do it using the driver system and want to contribute this work to
FPC, I can imagine it could even become part of our SVN repository and
future official FPC releases under some conditions (however, this last
sentence is my personal view, not necessarily shared by the whole FPC core
team).
Tomas
More information about the fpc-devel
mailing list