Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Changes for 0.5.7 release

git-svn-id: svn://bknr.net/svn/trunk/thirdparty/cl-gd@4472 4281704c-cde7-0310-8518-8e2dc76b1ff0
  • Loading branch information...
commit ea94e42e1871334482d1a5f058fcdb41dea16a1a 1 parent fb919f5
Edi Weitz authored
View
11 CHANGELOG
@@ -1,10 +1,15 @@
+Version 0.5.7
+2009-11-22
+Changes WITH-TRANSFORMATIONS so that SBCL doesn't complain (Jeff Cunningham)
+Fixed typo in documentation (caught by J.P. Larocque)
+
Version 0.5.6
2007-07-29
-Make WITH-TRANSFORMATIONS thread-safe (thanks to Alain Picard)
+Made WITH-TRANSFORMATIONS thread-safe (thanks to Alain Picard)
Version 0.5.5
2007-04-24
-Ugh, fix the fix once more (again thanks to Jong-won Choi)
+Ugh, fixed the fix once more (again thanks to Jong-won Choi)
Version 0.5.4
2007-04-06
@@ -16,7 +21,7 @@ Fixed bug in DRAW-FREETYPE-STRING (reported by Andrei Stebakov)
Version 0.5.2
2007-02-28
-Fix CONVERT-TO-CHAR-REFERENCES (bug caught by Luo Yong)
+Fixed CONVERT-TO-CHAR-REFERENCES (bug caught by Luo Yong)
Documentation fixes (thanks to Yoni Rabkin Katzenell)
Version 0.5.1
View
2  cl-gd-glue.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+/* Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
View
4 cl-gd-test.asd
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/cl-gd-test.asd,v 1.11 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/cl-gd-test.asd,v 1.12 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
4 cl-gd-test.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/cl-gd-test.lisp,v 1.26 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/cl-gd-test.lisp,v 1.27 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
10 cl-gd.asd
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-USER; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/cl-gd.asd,v 1.18 2007/07/29 16:37:13 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/cl-gd.asd,v 1.20 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
@@ -40,7 +40,7 @@
:defaults (parse-namestring *load-truename*)))
(defsystem :cl-gd
- :version "0.5.6"
+ :version "0.5.7"
:serial t
:components ((:file "packages")
(:file "util")
@@ -54,5 +54,5 @@
(:file "drawing")
(:file "strings")
(:file "misc"))
- :depends-on (#-clisp :uffi
- #+clisp :cffi-uffi-compat))
+ :depends-on (#-(or :clisp :openmcl) :uffi
+ #+(or :clisp :openmcl) :cffi-uffi-compat))
View
4 colors-aux.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/colors-aux.lisp,v 1.12 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/colors-aux.lisp,v 1.13 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
4 colors.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/colors.lisp,v 1.25 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/colors.lisp,v 1.26 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
6 doc/index.html
@@ -203,7 +203,7 @@
CL-GD together with this documentation can be downloaded from <a
href="http://weitz.de/files/cl-gd.tar.gz">http://weitz.de/files/cl-gd.tar.gz</a>. The
-current version is 0.5.6. A <a href="http://packages.debian.org/cgi-bin/search_packages.pl?keywords=cl-gd&amp;searchon=names&amp;subword=1&amp;version=all&amp;release=all">Debian package</a> is available thanks to <a href="http://pvaneynd.mailworks.org/">Peter van Eynde</a> and <a href="http://b9.com/">Kevin Rosenberg</a>, so if you're on Debian you should have no problems installing CL-GD. There's also a port
+current version is 0.5.7. A <a href="http://packages.debian.org/cgi-bin/search_packages.pl?keywords=cl-gd&amp;searchon=names&amp;subword=1&amp;version=all&amp;release=all">Debian package</a> is available thanks to <a href="http://pvaneynd.mailworks.org/">Peter van Eynde</a> and <a href="http://b9.com/">Kevin Rosenberg</a>, so if you're on Debian you should have no problems installing CL-GD. There's also a port
for <a href="http://www.gentoo.org/proj/en/common-lisp/index.xml">Gentoo Linux</a> thanks to Matthew Kennedy. Otherwise, proceed like this:
<ul>
<li>Download and install a recent version of <a href="http://www.cliki.net/asdf">asdf</a>.
@@ -618,7 +618,7 @@
</blockquote>
<p><br>[Function]
-<br><a class=none name="color-component"><b>color-component</b> <i>color component <tt>&amp;key</tt> image</i> =&gt; <i>component</i></a>
+<br><a class=none name="color-component"><b>color-component</b> <i>component color <tt>&amp;key</tt> image</i> =&gt; <i>component</i></a>
<blockquote><br>
Returns the specified color component of <code><i>color</i></code>. <code><i>component</i></code> can be
@@ -1434,7 +1434,7 @@
H&uuml;bner</a> for the GIF patches. Thanks to <a href='http://bl0rg.net/'>Manuel Odendahl</a> for lots of useful patches.
Thanks to Luis Oliveira for CLISP/CFFI support and to Bryan O'Connor for OpenMCL support.
<p>
-$Header: /usr/local/cvsrep/gd/doc/index.html,v 1.75 2007/07/29 16:37:15 edi Exp $
+$Header: /usr/local/cvsrep/gd/doc/index.html,v 1.77 2009/11/23 17:04:47 edi Exp $
<p><a href="http://weitz.de/index.html">BACK TO MY HOMEPAGE</a>
</body>
View
4 drawing.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/drawing.lisp,v 1.28 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/drawing.lisp,v 1.29 2009/11/23 17:05:38 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
4 gd-uffi.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/gd-uffi.lisp,v 1.32 2007/04/05 23:22:24 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/gd-uffi.lisp,v 1.33 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
7 images.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/images.lisp,v 1.33 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/images.lisp,v 1.34 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
@@ -86,8 +86,7 @@ as TYPE or otherwise it will be guessed from the PATHNAME-TYPE of
FILE-NAME. You are responsible for destroying the image after you're
done with it. It is advisable to use WITH-IMAGE-FROM-FILE instead."
(check-type file-name (or pathname string))
- (let* ((file-name (truename file-name))
- (pathname-type (pathname-type file-name))
+ (let* ((pathname-type (pathname-type file-name))
(%type (or type
(cond ((or (string-equal pathname-type "jpg")
(string-equal pathname-type "jpeg"))
View
4 init.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/init.lisp,v 1.12 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/init.lisp,v 1.13 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
8 misc.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/misc.lisp,v 1.15 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/misc.lisp,v 1.16 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
@@ -220,12 +220,12 @@ destination image."
(let ((,raw-pixels (get-slot-value ,img 'gd-image 'pixels)))
(declare (type pixels-array ,raw-pixels))
(dotimes (,y-var ,height)
- (let ((,row (deref-array ,raw-pixels '(:array (* :unsigned-byte)) ,y-var)))
+ (let ((,row (deref-array ,raw-pixels '(:array (* :unsigned-char)) ,y-var)))
(declare (type pixels-row ,row))
(macrolet ((do-pixels-in-row ((,x-var) &body ,inner-body)
`(dotimes (,,x-var ,',width)
(macrolet ((raw-pixel ()
- `(deref-array ,',',row '(:array :unsigned-byte) ,',,x-var)))
+ `(deref-array ,',',row '(:array :unsigned-char) ,',,x-var)))
(locally
,@,inner-body)))))
(locally
View
4 specials.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/specials.lisp,v 1.29 2007/01/01 23:41:00 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/specials.lisp,v 1.30 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
4 strings.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/strings.lisp,v 1.23 2007/04/24 09:01:39 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/strings.lisp,v 1.24 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
View
40 transform.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/transform.lisp,v 1.21 2007/07/29 16:37:13 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/transform.lisp,v 1.23 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
@@ -72,7 +72,10 @@ macro."))
"Like ROUND but make sure result isn't longer than 32 bits."
(mod (round x) +most-positive-unsigned-byte-32+))
-(defmacro with-transformation ((&key x1 x2 width y1 y2 height reverse-x reverse-y (radians t) (image '*default-image*)) &body body)
+(defmacro with-transformation ((&key (x1 0 x1set) (x2 0 x2set) (width 0 wset)
+ (y1 0 y1set) (y2 0 y2set) (height 0 hset)
+ reverse-x reverse-y (radians t) (image '*default-image*))
+ &body body)
"Executes BODY such that all points and width/height data are
subject to a simple affine transformation defined by the keyword
parameters. The new x-axis of IMAGE will start at X1 and end at X2 and
@@ -93,24 +96,19 @@ BODY will be assumed to be provided in radians, otherwise in degrees."
angle-transformer)
;; rebind for thread safety
`(let ((*transformers* *transformers*))
- (unless (<= 2 (count-if #'identity (list ,x1 ,x2 ,width)))
- (error "You must provide at least two of X1, X2, and WIDTH."))
- (unless (<= 2 (count-if #'identity (list ,y1 ,y2 ,height)))
- (error "You must provide at least two of Y1, Y2, and HEIGHT."))
- (when (and ,x1 ,x2 ,width
- (/= ,width (- ,x2 ,x1)))
- (error "X1, X2, and WIDTH don't match. Try to provide just two of the three arguments."))
- (when (and ,y1 ,y2 ,height
- (/= ,height (- ,y2 ,y1)))
- (error "Y1, Y2, and HEIGHT don't match. Try to provide just two of the three arguments."))
- ;; kludgy code to keep SBCL quiet
- (unless ,x1 (setq ,x1 (- ,x2 ,width)))
- (unless ,x2 (setq ,x2 (+ ,x1 ,width)))
- (unless ,width (setq ,width (- ,x2 ,x1)))
- (unless ,y1 (setq ,y1 (- ,y2 ,height)))
- (unless ,y2 (setq ,y2 (+ ,y1 ,height)))
- (unless ,height (setq ,height (- ,y2 ,y1)))
- (multiple-value-bind (,image-width ,image-height)
+ (macrolet ((checkargs (a1 a1set a2 a2set aspan aspanset c lbl)
+ `(progn
+ (cond ((and ,a1set ,a2set) (setq ,aspan (- ,a2 ,a1)))
+ ((and ,a1set ,aspanset) (setq ,a2 (+ ,a1 ,aspan)))
+ ((and ,a2set ,aspanset) (setq ,a1 (- ,a2 ,aspan)))
+ (t (error "Two of ~c1, ~:*~c2, or ~a must be provided." ,c ,lbl)))
+ (unless (> ,aspan 0)
+ (error "~c1 must be smaller than ~:*~c2." ,c))
+ (unless (< (abs (/ (- ,a2 (+ ,a1 ,aspan)) ,aspan)) 1.e-5)
+ (error "~c1, ~:*~c2, and ~a don't match. Try to provide just two of the three arguments." ,c ,lbl)))))
+ (checkargs ,x1 ,x1set ,x2 ,x2set ,width ,wset #\x "width")
+ (checkargs ,y1 ,y1set ,y2 ,y2set ,height ,hset #\y "height"))
+ (multiple-value-bind (,image-width ,image-height)
(without-transformations
(image-size ,image))
(let* ((,stretch-x (/ ,image-width ,width))
View
4 util.lisp
@@ -1,7 +1,7 @@
;;; -*- Mode: LISP; Syntax: COMMON-LISP; Package: CL-GD; Base: 10 -*-
-;;; $Header: /usr/local/cvsrep/gd/util.lisp,v 1.15 2007/02/28 15:47:58 edi Exp $
+;;; $Header: /usr/local/cvsrep/gd/util.lisp,v 1.16 2009/11/23 17:05:39 edi Exp $
-;;; Copyright (c) 2003-2007, Dr. Edmund Weitz. All rights reserved.
+;;; Copyright (c) 2003-2009, Dr. Edmund Weitz. All rights reserved.
;;; Redistribution and use in source and binary forms, with or without
;;; modification, are permitted provided that the following conditions
Please sign in to comment.
Something went wrong with that request. Please try again.