Commit 68d5dac3 authored by Pascal J. Bourguignon's avatar Pascal J. Bourguignon

Added pgl/README; detect and signal inexistant file on image.create.

parent 595b1dd2
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
cd spl
make install
This installs:
You may install spl.jar somewhere else, by binding its pathname to the variable PGL:*SPL-PATH*.
Running Examples
(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.
(load #P"examples/checkerboard.lisp")
(load #P"examples/felt-board.lisp")
(load #P"examples/image.lisp")
(com.informatimago.portable-graphics-library.example.image:run #P"examples/tierra-desde-luna.jpg")
......@@ -1710,6 +1710,8 @@ from OBJECT and COMPOUND-MIXIN.
(extract-slots '(filename)))
(defmethod initialize-instance :after ((self image) &key &allow-other-keys)
(unless (probe-file (filename self))
(error 'file-error :pathname (filename self)))
(let ((size (image.create self (filename self))))
(setf (slot-value self 'width) (dimension-width size)
(slot-value self 'height) (dimension-height size))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment