[Pharo-project] a probably stupid question on canvas
Hi guys I was wondering why we need a separate class named AlphaBlendingCanvas Igor can you have a look and depending on your answer I will put it on my todo list. Stef ?
On 27 November 2012 21:51, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
Hi guys
I was wondering why we need a separate class named AlphaBlendingCanvas Igor can you have a look and depending on your answer I will put it on my todo list.
well, i think it is there for historical reasons. original model did not supported alpha-blending. what happen next, you can witness :)
Stef ?
-- Best regards, Igor Stasenko.
And this is not the only example. same goes for BitBlt GrafPort WarpBlt which are products of adding new features to VM without reconsidering/cleaning up the whole model/interface(s). And of course, as always, keeping backwards compatibility is a good excuse. ;) so we end up with many faces of same beast.. and as original developers gone, nobody dares go inside and clean it up. -- Best regards, Igor Stasenko.
So reply to my question? Should we merge alpha and color? ifTrue: I will do it. Stef On Nov 28, 2012, at 12:11 AM, Igor Stasenko wrote:
And this is not the only example. same goes for BitBlt GrafPort WarpBlt
which are products of adding new features to VM without reconsidering/cleaning up the whole model/interface(s). And of course, as always, keeping backwards compatibility is a good excuse. ;)
so we end up with many faces of same beast.. and as original developers gone, nobody dares go inside and clean it up.
-- Best regards, Igor Stasenko.
On 28 November 2012 19:45, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
So reply to my question? Should we merge alpha and color? ifTrue: I will do it.
you mean ColorMappingCanvas and AlphaBlendingCanvas? i'd rather just remove them. IMO it doesn't worth time & effort. Especially in light of our dream to migrate on Athens :) yes, actually you can merge them and just give mapping as a block: mapingCanvas := otherCanvas asColorMappingCanvas: [:color | color darker ]. and so, you can get rid of all subclasses of ColorMappingCanvas alltogether. But besides of that, i don't particularily like how this is implemented: in order to do such mapping, it wraps the whole canvas protocol... I you would ask such lazy guy, like me, how to implement such functionality properly, i will find a lot of excuses why you should not do it like ColorMappingCanvas does. -- Best regards, Igor Stasenko.
participants (2)
-
Igor Stasenko -
Stéphane Ducasse