From a06169fa3f57d6f4480aca28ca88222c67998790 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sun, 21 Oct 2012 14:53:24 -0700 Subject: [PATCH] colors: can't bootstrap when using locals in colors... --- basis/colors/colors.factor | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/colors/colors.factor b/basis/colors/colors.factor index 4e178c56a7..25830630e9 100644 --- a/basis/colors/colors.factor +++ b/basis/colors/colors.factor @@ -1,7 +1,7 @@ ! Copyright (C) 2003, 2009 Slava Pestov. ! Copyright (C) 2008 Eduardo Cavazos. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors combinators kernel math locals ; +USING: accessors combinators kernel math ; IN: colors TUPLE: color ; @@ -29,9 +29,9 @@ M: color blue>> ( color -- blue ) >rgba blue>> ; CONSTANT: transparent T{ rgba f 0.0 0.0 0.0 0.0 } -:: linear-gradient ( color1 color2 percent -- color ) - color1 >rgba-components drop [ 1.0 percent - * ] tri@ - color2 >rgba-components drop [ percent * ] tri@ +: linear-gradient ( color1 color2 percent -- color ) + [ 1.0 swap - * ] [ * ] bi-curry swapd + [ [ >rgba-components drop ] [ tri@ ] bi* ] 2bi@ [ + ] tri-curry@ tri* 1.0 ; : inverse-color ( color -- color' )