Thanks Johann,
I applied the patch.
Tamas
On Sun, Jun 29, 2008 at 01:37:40AM +0200, johann korndoerfer wrote:
hi
attached is a patch for extending cl-colors to provide convex combination of rgba colors, too.
greets johann
Index: package.lisp
--- package.lisp (revision 2) +++ package.lisp (working copy) @@ -4,4 +4,4 @@ rgba alpha hsv hue saturation value rgb->hsv hsv->rgb ->hsv ->rgb
convex-combination hue-combination rgb-combination hsv-combination))
convex-combination hue-combination rgb-combination rgba-combination hsv-combination))
Index: colors.lisp
--- colors.lisp (revision 2) +++ colors.lisp (working copy) @@ -161,6 +161,12 @@ (with-convex-combination (cc rgb1 rgb2 alpha) (make-instance 'rgb :red (cc #'red) :green (cc #'green) :blue (cc #'blue))))
+(defun rgba-combination (rgba1 rgba2 alpha)
- "Convex combination in RGBA space."
- (with-convex-combination (cc rgba1 rgba2 alpha)
- (make-instance 'rgba :red (cc #'red) :green (cc #'green) :blue (cc #'blue) :alpha (cc #'alpha))))
(defun hsv-combination (hsv1 hsv2 alpha positivep) (with-convex-combination (cc hsv1 hsv2 alpha) (make-instance 'hsv
cl-colors-devel mailing list cl-colors-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/cl-colors-devel