diff -r 53f0ea77b1e4 -r 86566f076d30 Color.st --- a/Color.st Thu Oct 07 00:32:34 1999 +0200 +++ b/Color.st Thu Oct 07 00:56:20 1999 +0200 @@ -1587,7 +1587,7 @@ "return the transparent-color" Transparent isNil ifTrue:[ - Transparent := TranslucentColor red:0 green:0 blue:0. + Transparent := TranslucentColor scaledRed:0 scaledGreen:0 scaledBlue:0. Transparent setAlphaByte:0. ]. ^ Transparent @@ -4459,6 +4459,20 @@ !Color methodsFor:'instance creation'! +alpha:alphaValue + "return a new color with the same color, but different alpha as the receiver" + + alphaValue = 1 ifTrue:[ ^ self]. + ^ (TranslucentColor + scaledRed:red + scaledGreen:green + scaledBlue:blue) alpha:alphaValue + + " + Color red alpha:0.5 + " +! + blendWith:aColor "create a new color from equally mixing the receiver and the argument, aColor. @@ -4898,6 +4912,6 @@ !Color class methodsFor:'documentation'! version - ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.139 1999-10-06 22:26:32 cg Exp $' + ^ '$Header: /cvs/stx/stx/libview/Color.st,v 1.140 1999-10-06 22:56:20 cg Exp $' ! ! Color initialize!