wait a sec why Alpha affects the Color ? o_O

Color white - (Color white alpha:0.5) = Color gray.

What ? No ! This make no sense


Color white - (Color white alpha:0) = Color white

Ok reasonable


Color white - (Color white alpha:1.0) = Color black.
again reasonable




On Sun, Mar 22, 2015 at 4:06 PM, Aliaksei Syrel <alex.sy...@gmail.com>
wrote:

> Color white - (Color white alpha:0) = Color white
>> Color white - (Color white alpha:0.5) = Color gray.
>> Color white - (Color white alpha:1.0) = Color black.
>> For what do you need the color arithmetic ?
>> Maybe there are already other operations defined on Color that you can
>> used instead.
>
>
> That is too complicated :)
> The idea was to have one-line fix that just leaves the behaviour as it was
> before, simply makes it not produce garbage.
> Basically there should be a long discussion after pharo 4 is released.
>
> How it is now:
> (Color white alpha: 0) = Color transparent => false
> Color white - (Color white alpha: 0) = Color black => true
>
> From logical point of view is should not be black. But from mathematical
> point of view Color is just a vector and operations with it should be the
> same or almost the same as with vectors.
>
> For what do you need the color arithmetic ?
>
> I wanted to get linear discrete transformation from one color to another
> to use it in animation
>
> Cheers,
> Alex
>
> On Sun, Mar 22, 2015 at 1:54 PM, Marcus Denker <marcus.den...@inria.fr>
> wrote:
>
>>
>> On 22 Mar 2015, at 13:35, Nicolai Hess <nicolaih...@web.de> wrote:
>>
>>
>>
>> 2015-03-22 12:43 GMT+01:00 Nicolai Hess <nicolaih...@web.de>:
>>
>>>
>>>
>>> 2015-03-21 15:51 GMT+01:00 Eliot Miranda <eliot.mira...@gmail.com>:
>>>
>>>> Why not take the average of alpha in all cases?
>>>>
>>>> Eliot (phone)
>>>>
>>>> On Mar 21, 2015, at 6:32 AM, Aliaksei Syrel <alex.sy...@gmail.com>
>>>> wrote:
>>>>
>>>
>>>
>>> Or weight the argument by its alpha and don't change the alpha of the
>>> receiver:
>>> Color white - (Color white alpha:0) = Color white
>>> Color white - (Color white alpha:0.5) = Color gray.
>>> Color white - (Color white alpha:1.0) = Color black.
>>>
>>> For what do you need the color arithmetic ?
>>> Maybe there are already other operations defined on Color that you can
>>> used instead.
>>>
>>> As the arithmetic operations on Color doesn't work (for years?), maybe
>>> we should remove
>>> the operation now, and replace them with a more verbose api
>>> addRGB/ addRGBA/ subRGBA ....
>>>
>>> nicolai
>>>
>>>
>> Ah, this issue is already closed. That was a rather short discussion. And
>> #/ and #* still don't work
>> for colors.
>>
>>
>> Yes… I think we have a problem that there is no “this is ready for
>> integration” check.
>>
>> We need to get more careful…
>>
>> Marcus
>>
>
>

Reply via email to