Portable Graphics Library

This package implements a Portable Graphics Library using the
JavaBackEnd from the Stanford Portable Library.




The spl must be installed:

     # Required system packages:
     # bash binutils coreutils findutils gcc java-1.?.0-openjdk-devel

     cd /usr/local/src
     git clone git@github.com:cs50/spl.git
     cd spl
     make install

This installs:

     /usr/local/include/spl/*.h      -- For use by programs written
     /usr/local/lib/libcs.a          -- in C or C++.


PGL:*PROGRAM-NAME*   (string)   You can set it to the name of your
                                program; it's used in the menu bar and
                                dock icon as application name.

PGL:*JAVA-PROGRAM*   (string)   The name or the path to the java program.

PGL:*SPL-PATH*       (string)   The path to the spl.jar library.

For now the defaults work for unix system; for MS-Windows system you
will have to set those variables to the windows paths (remember that
in strings, a backslash must be escaped with a backslash).

(Please contribute an example of configuration for MS-Window).

Running Examples

To run all the examples together:

    (ql:quickload :com.informatimago.pgl.examples)

or you can load and run them separately:

    (load #P"examples/yarn-pattern.lisp")

    (load #P"examples/yin-yang.lisp")

    (load #P"examples/ball.lisp")
    (bt:make-thread (lambda () (com.informatimago.portable-graphics-library.example.ball:run)))
    ;; to let it run in a background thread while we go on.

    ;; Note: if threads are not available (happens in some implementation,
    ;; depending on compilation options), you can run it directly, but you
    ;; will have to close the window to continue with the REPL:

    (load #P"examples/checkerboard.lisp")

    (load #P"examples/felt-board.lisp")

    (load #P"examples/image.lisp")

__Pascal Bourguignon__
Fri Mar 10 23:17:09 CET 2017