Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2005-09

Graphics in Linux?

13 messages · 8 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Hantsch

Hi!

I want to write a little program for visualizing all moves of a CNC machine on LINUX.
Actually it would be more than sufficient when that what the good old "graph" unit of TurboPascal/DOS would be available, because all I need is simple pixel graphics.

With my change to FreePascal and Linux (which is many years ago), I were not able to do anything with graphics (was not really required), but now I have no alternate option.
.) Is someting available meanwhile? (and what?)
.) Is something for OOP programming out? Most my programs don't use classes so it should not force me to use them. Best would really be some kind of "graph" emulation.

Could you (if something _working_ is already available), please, leave me a link to it and - please - leave me a short example-source?

Thanks in advance.

mfg

Ing. Rainer Hantsch

.---------------------------------------------------------------------. | \\|// Ing. Rainer HANTSCH - Hardware + Software | | (o o) Service - Support - WEB-Design und Programmierung | |--oOOo-(_)-oOOo------------------------------------------------------| | Ing. Rainer HANTSCH | mail: | | Khunngasse 21/20 | www: http://www.hantsch.co.at | | A-1030 Vienna | tel: +43-1-79885380 fax: +43-1-798853818 | | ** A u s t r i a ** | handy: +43-664-9194382 UID-Nr: ATU 11134002 | '---------------------------------------------------------------------'

Reply by email

Peter Andersen
to Rainer Hantsch
Rainer Hantsch wrote 17 lines
Hi! I want to write a little program for visualizing all moves of a CNC machine on LINUX. Actually it would be more than sufficient when that what the good old "graph" unit of TurboPascal/DOS would be available, because all I need is simple pixel graphics. With my change to FreePascal and Linux (which is many years ago), I were not able to do anything with graphics (was not really required), but now I have no alternate option. .) Is someting available meanwhile? (and what?) .) Is something for OOP programming out? Most my programs don't use classes so it should not force me to use them. Best would really be some kind of "graph" emulation.

You should take a look at the dokumatation in the units.pdf there is lot of "GRAPH" it is in chapter 8. It is just like the old days with TP6.0

/ Peter Andersen / Skanderborg

Reply by email

Rainer Hantsch
to Peter Andersen

Hi, Peter!

When nothing "dramatic" has changed (and I do not remember to have even heared about any attempt to get this fixed from Michael), the graph unit will still only be usable for DOS and (maybe) for windows, but not for LINUX.

Because I use a 100% Linux environment, this means in fact, that graph is not existing for me when it is not able to hook into X11 and simulate there somehow a graphics display. And exactly this does not work. :-/

On Wed, 28 Sep 2005, Peter Andersen wrote:
| You should take a look at the dokumatation in the units.pdf there is lot | of "GRAPH" it is in chapter 8. It is just like the old days with TP6.0

mfg

Ing. Rainer Hantsch

.---------------------------------------------------------------------. | \\|// Ing. Rainer HANTSCH - Hardware + Software | | (o o) Service - Support - WEB-Design und Programmierung | |--oOOo-(_)-oOOo------------------------------------------------------| | Ing. Rainer HANTSCH | mail: | | Khunngasse 21/20 | www: http://www.hantsch.co.at | | A-1030 Vienna | tel: +43-1-79885380 fax: +43-1-798853818 | | ** A u s t r i a ** | handy: +43-664-9194382 UID-Nr: ATU 11134002 | '---------------------------------------------------------------------'

Reply by email

Peter Andersen
to Rainer Hantsch
Rainer Hantsch wrote 5 lines
Hi, Peter! When nothing "dramatic" has changed (and I do not remember to have even heared about any attempt to get this fixed from Michael), the graph unit will still only be usable for DOS and (maybe) for windows, but not for LINUX.

Here you are wrong :) It's working in linux that's for sure (i am using it) But that is on a svga console. Display 800x600 and 256 color.

Because I use a 100% Linux environment, this means in fact, that graph is not existing for me when it is not able to hook into X11 and simulate there somehow a graphics display. And exactly this does not work. :-/

Ok so what you ned is something that are easy as the graph unit but can run under X11 in a xterm or what. If this is what you are looking for then please let me know if you find anything. Because i have not found it yet :) But i am still seaching.

/ Peter Andersen / Skanderborg

Reply by email

Michalis Kamburelis
to Rainer Hantsch: Hi, Peter! When nothing "dramatic" has changed (and I do not remember to have even heared…
Rainer Hantsch wrote 10 lines
Hi, Peter! When nothing "dramatic" has changed (and I do not remember to have even heared about any attempt to get this fixed from Michael), the graph unit will still only be usable for DOS and (maybe) for windows, but not for LINUX. Because I use a 100% Linux environment, this means in fact, that graph is not existing for me when it is not able to hook into X11 and simulate there somehow a graphics display. And exactly this does not work. :-/

Use SDL if you want good modern library for 2d graphics (and some other things). Pascal bindings are available. I use jedi-sdl bindings (CVS version), they work perfectly with FPC under Linux, FreeBSD and Windows (and probably many other platforms too).

Michalis

Reply by email

Rainer Hantsch
to Peter Andersen: Here you are wrong :) It's working in linux that's for sure (i am using it) But that is…

On Thu, 29 Sep 2005, Peter Andersen wrote:

| Rainer Hantsch wrote:
| Here you are wrong :) It's working in linux that's for sure (i am using | it) But that is on a svga console. Display 800x600 and 256 color.

Well, this is actually useless because it only works on the local display. I would loose/miss all advantages of X11, i.e. to be able to oberate an applicatin over a network from anywhere.

| > Because I use a 100% Linux environment, this means in fact, that graph is | > not existing for me when it is not able to hook into X11 and simulate | > there somehow a graphics display. And exactly this does not work. :-/ |
| Ok so what you ned is something that are easy as the graph unit but can | run under X11 in a xterm or what. If this is what you are looking for | then please let me know if you find anything. Because i have not found | it yet :) But i am still seaching.

Yes, this is exactly what I am looking for.

What I wonder is that nobody found a way to open a X11 window redirect all this stuff from/to it, since I started with Linux and FreePascal. -- And this is more than 6 years ago.

All what would be required would be some kind of graphX unit, which actually takes over the keyboard, mouse and graphics handling and makes this stuff available through a set of procedures/functions/methods/vars. The result would be a "graph" unit for X11, without forcing me to start at zero with programming X.

Ok, I am not the right one to develop something like that, but isn't that astonishing? You can easily find (-> thanks to Ken Wright!) a full ncurses implementation (for developing text based apps), or full GUI stuff (as Kylix does), but nothing for OOP or procedural mode.

mfg

Ing. Rainer Hantsch

.---------------------------------------------------------------------. | \\|// Ing. Rainer HANTSCH - Hardware + Software | | (o o) Service - Support - WEB-Design und Programmierung | |--oOOo-(_)-oOOo------------------------------------------------------| | Ing. Rainer HANTSCH | mail: | | Khunngasse 21/20 | www: http://www.hantsch.co.at | | A-1030 Vienna | tel: +43-1-79885380 fax: +43-1-798853818 | | ** A u s t r i a ** | handy: +43-664-9194382 UID-Nr: ATU 11134002 | '---------------------------------------------------------------------'

Reply by email

Florian Klaempfl
to Rainer Hantsch
Rainer Hantsch wrote 17 lines
Yes, this is exactly what I am looking for. What I wonder is that nobody found a way to open a X11 window redirect all this stuff from/to it, since I started with Linux and FreePascal. -- And this is more than 6 years ago. All what would be required would be some kind of graphX unit, which actually takes over the keyboard, mouse and graphics handling and makes this stuff available through a set of procedures/functions/methods/vars. The result would be a "graph" unit for X11, without forcing me to start at zero with programming X. Ok, I am not the right one to develop something like that, but isn't that astonishing? You can easily find (-> thanks to Ken Wright!) a full ncurses implementation (for developing text based apps), or full GUI stuff (as Kylix does), but nothing for OOP or procedural mode.

What about SDL?

Reply by email

Alexey Pavluchenko
to Rainer Hantsch: | Here you are wrong :) It's working in linux that's for sure (i am using | it) But that…

Hello Rainer,

Thursday, September 29, 2005, 2:08:53 PM, you wrote:

RH> What I wonder is that nobody found a way to open a X11 window redirect all RH> this stuff from/to it, since I started with Linux and FreePascal. -- And this RH> is more than 6 years ago.

In addition to SDL which already was mentioned, you may also take a look at GRX:

http://grx.gnu.de

Though it only has gpc bindings it may be possible to port it to FPC as well.

Best regards, Alexey

Reply by email

greim
to Rainer Hantsch: | Here you are wrong :) It's working in linux that's for sure (i am using | it) But that…

I played this weekend a litte bit arround with grx. There is a graph unit for gpc.
After some hours, a kind of bgidemo seems to run in fpc/X-Windows. Ther are still some problems drawing characters in several angles and drawing polygons, but all other things seems (quiet fast!) to run. Its still a hack, but if there is somebody intersted in i may publish it. Theoretical it should alos work with WIN32 but i have not testet it yet.

Mit freundlichen Grüßen

Markus Greim

Reply by email

Felipe Monteiro de Carvalho
to greim
greim wrote 5 lines
After some hours, a kind of bgidemo seems to run in fpc/X-Windows. Ther are still some problems drawing characters in several angles and drawing polygons, but all other things seems (quiet fast!) to run. Its still a hack, but if there is somebody intersted in i may publish it. Theoretical it should alos work with WIN32 but i have not testet it yet.

Why don´t you publish the results on the Lazarus wiki?

Note that since this is specific to a graphical library (or unit), you should create a new wiki page and put a link to in on http://wiki.lazarus.freepascal.org/index.php/Developing_with_Graphics

Felipe Monteiro de Carvalho

Reply by email

GEOFF BAGLEY
to greim: I played this weekend a litte bit arround with grx. There is a graph unit for gpc. After…
--- greim wrote 8 lines
I played this weekend a litte bit around with grx. There is a graph unit for gpc. After some hours, a kind of bgidemo seems to run in fpc/X-Windows. Its still a hack, but if there is somebody intersted in i may publish it.

I would be interested in a Unit to output vector-
graphics possibly via postscript/ghostscript.

This gives very much better results than the old
raster
scan of Turbo Unit graph. I would like to draw maps, an also mathematical graphs.

Another approach might be through Kile and LaTeX.

Auch mit freundlichen Grüßen. Ich kann etwas Deutsch

verstehen !

Geoff Bagley.

Show quoted text 5 lines
_______________________________________________ fpc-pascal maillist -

http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply by email

Florian Klaempfl
to Geoff Bagley
Geoff Bagley wrote
Is it possible to "stream" the output of an FPC program into the input of the next like the "C" people do on Linux ? They have "stdio.h" . I have never seem this done in Pascal.

Huh? As long as you don't use units like crt write(ln) and read(ln) works with the standard i/o handles.

E.G. prog1 | prog2 | prog3 etc. where "|" is the pipe for passing the results from one prog to he next.

Reply by email