[gcompris-devel] Question about the colorblind support

Bruno Coudoin bruno.coudoin at free.fr
Tue Dec 1 06:49:17 UTC 2009


Le lundi 30 novembre 2009 à 20:27 -0200, Sérgio Durigan Júnior a écrit :
> Hello,
> 
> This is not the status of the colorblind work (yet).  I would like to
> share some thoughts about the implementation, and if possible, have my
> question answered :-).

Will try ;)

> While implementing the feature, I decided that it would be good to
> make something that could be used by any activity of Gcompris,
> including those that will eventually appear.  So I began to
> investigate how I could do that, and as I said in one of my e-mails to
> this list, I based the work on the gnome-mag software.  Well, the
> thing is:  for Gcompris to be able to correctly modify its interface
> in order to handle colorblindness, I have to work with an object
> called GdkPixbuf.  This object is used everywhere on Gcompris, so I
> found myself in trouble...  I started to look for some callback or
> some abstraction where I could implement the colorblind code only
> once, but still didn't find anything.  After some thought, I came up
> with three possible solutions for that:

As far as I remember, all pixmap loads goes through a single point in
GCompris defined in gameutil.c:gc_pixmap_load_or_null()

In fact there is a couple of loads beyond that but these is pretty rare.

What you must take care now is that we also use svg and we are going to
use it more and more. Are you prepared for that.

> 1) Gcompris uses GooCanvas, and maintains a copy of it inside its own
> repository.  This way, I could implement something on GooCanvas
> (instead of Gcompris), and try to make it be available for every
> activity.  This sounds like the easiest solution, but I still have to
> investigate and see if it's feasible.

Yes, I think it's the correct place to do this. Ultimatly we should be
able to pass a config to goocanvas to configure it for colorblind =
true.

> So, now I have to decide between those.  Bruno, am I thinking right
> here?  Are those the correct options?  Do you see some other way to
> accomplish this?
> 

I think the canvas way is the best, you could test it on the goocanvas
copy in GCompris and propose it to the goocanvas authors, they maybe
interrested as well.

Bruno.






More information about the Gcompris-devel mailing list