Portable Graphics Library ======================================== This package implements a Portable Graphics Library using the JavaBackEnd from the Stanford Portable Library. References ---------------------------------------- http://cs.stanford.edu/~eroberts/papers/ITiCSE-2013/PortableGraphicsLibrary.pdf https://github.com/cs50/spl https://cs.stanford.edu/people/eroberts/jtf/tutorial/UsingTheGraphicsPackage.html Installation ---------------------------------------- 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 make install This installs: /usr/local/include/spl/*.h -- For use by programs written /usr/local/lib/libcs.a -- in C or C++. /usr/local/lib/spl.jar Configuration ---------------------------------------- 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) (com.informatimago.pgl.examples:run-all) or you can load and run them separately: (load #P"examples/yarn-pattern.lisp") (com.informatimago.portable-graphics-library.example.yarn-pattern:run) (load #P"examples/yin-yang.lisp") (com.informatimago.portable-graphics-library.example.yin-yang:run) (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: (com.informatimago.portable-graphics-library.example.ball:run) (load #P"examples/checkerboard.lisp") (com.informatimago.portable-graphics-library.example.checkerboard:run) (load #P"examples/felt-board.lisp") (com.informatimago.portable-graphics-library.example.felt-board:run) (load #P"examples/image.lisp") (com.informatimago.portable-graphics-library.example.image:run #P"examples/tierra-desde-luna.jpg") -- __Pascal Bourguignon__ mailto:pjb@informatimago.com Fri Mar 10 23:17:09 CET 2017