EGGX/ProCALL 2003

November 19, 2021 ยท View on GitHub

Modern Fortran modules that contain interfaces to the free X11 graphics library EGGX/ProCALL. The EGGX/ProCALL library provides fast and simple drawing routines on Linux, Unix, and Cygwin, directly callable from C or FORTRAN 77.

EGGX/ProCALL 2003 is a wrapper around EGGX/ProCALL that includes:

  • Fortran 90 interfaces to the FORTRAN 77 ProCALL subroutines (module procall).
  • Selected Fortran 2003 ISO C binding interfaces to C functions in EGGX that do not have a FORTRAN counterpart (module eggx).
  • Named parameters of key codes, colour palettes, and output formats.

Build Instructions

Simply clone the GitHub repository and execute the Makefile:

$ git clone https://github.com/interkosmos/eggx-procall-2003
$ cd eggx-procall-2003/
$ make

The EGGX/ProCALL 0.95 source code is included in directory vendor/eggx-0.95/.

Link your Fortran application with vendor/eggx-0.95/libeggx.a, libeggx2003.a, and -lX11, for instance:

$ gfortran -o demo demo.f90 libeggx.a libeggx2003.a -lX11

Examples

See directory examples/ for some demo applications:

  • julia draws the Julia set.
  • mandelbrot draws the Mandelbrot set.
  • munch renders a graphical pattern.
  • peano draws a Peano curve.
  • snake sprites-based implementation of the snake game.
  • starfield lets you fly through a starfield.
  • tiles draws text and a tileset to screen.
  • wireframe renders the 3D model of a Tie-Figher.

Compile all programs with:

$ make examples

Or, use the name of a particular example. Run each program from its respective directory:

$ make <name>
$ cd examples/<name>/
$ ./<name>

Screen Shots

Screen Shots

Documentation

For the official documentation, see the PDF file vendor/eggx-0.95/eggx_procall.pdf.

Generate the source code documentation with FORD. Add FORD with pip, for example:

$ python3 -m venv virtual-environment/
$ source virtual-environment/bin/activate
$ python3 -m pip install ford

Or, instead, just install the package in your user directory:

$ python3 -m pip install --user ford

Then, run:

$ ford project.md -d ./src

Open doc/index.html in a web browser.

Coverage

ProCALL

FORTRAN 77 routineFortran 2003 interface
arcarc
arohdarohd
circ1circ1
clscclsc
clsxclsx
copylayercopylayer
drawarcdrawarc
drawarrowdrawarrow
drawcircdrawcirc
drawlinedrawline
drawlinesdrawlines
drawnumdrawnum
drawpolydrawpoly
drawptsdrawpts
drawrectdrawrect
drawstrdrawstr
drawsymdrawsym
drawsymsdrawsyms
fillarcfillarc
fillcircfillcirc
fillpolyfillpoly
fillrectfillrect
gclosegclose
gcloseallgcloseall
gclrgclr
ggetchggetch
ggetdisplayinfoggetdisplayinfo
ggeteventggetevent
ggetxpressggetxpress
gopengopen
gsetbgcolorgsetbgcolor
gsetnonblockgsetnonblock
isnanisnan
layerlayer
lineline
linetolineto
makecolormakecolor
movetomoveto
msleepmsleep
newcolornewcolor
newcoordinatenewcoordinate
newfontsetnewfontset
newhsvcolornewhsvcolor
newlinestylenewlinestyle
newpennewpen
newpencolornewpencolor
newrgbcolornewrgbcolor
newwindownewwindow
numbernumber
plotplot
plotsplots
psetpset
putimg24putimg24
rtocrtoc
saveimgsaveimg
selwinselwin
setalsetal
symbolsymbol
tclrtclr
vportvport
windowwindow

EGGX

C functionFortran 2003 interface
gputimageeggx_gputimage
winnameeggx_winname

Licence

GNU GPL (EGGX/ProCALL), ISC (EGXX/ProCALL 2003)