From cupe-spam at erleuchtet.org Sat Jun 28 23:37:40 2008 From: cupe-spam at erleuchtet.org (johann korndoerfer) Date: Sun, 29 Jun 2008 01:37:40 +0200 Subject: [cl-colors-devel] rgba-combination Message-ID: <4866CB44.5010300@erleuchtet.org> hi attached is a patch for extending cl-colors to provide convex combination of rgba colors, too. greets johann -------------- next part -------------- A non-text attachment was scrubbed... Name: rgba-combination.diff Type: text/x-patch Size: 1082 bytes Desc: not available URL: From tpapp at Princeton.EDU Sun Jun 29 09:03:05 2008 From: tpapp at Princeton.EDU (Tamas K Papp) Date: Sun, 29 Jun 2008 11:03:05 +0200 Subject: [cl-colors-devel] rgba-combination In-Reply-To: <4866CB44.5010300@erleuchtet.org> References: <4866CB44.5010300@erleuchtet.org> Message-ID: <20080629090305.GA3257@pu100877.student.princeton.edu> 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 at common-lisp.net > http://common-lisp.net/cgi-bin/mailman/listinfo/cl-colors-devel