Re: [Goocanvas-devel] Why color property is write only
Status: Beta
Brought to you by:
dachaplin
From: Damon C. <da...@ka...> - 2008-03-20 22:30:12
|
On Thu, 2008-03-20 at 23:16 +0100, Bruno Coudoin wrote: > Le lundi 03 mars 2008 à 22:29 +0000, Damon Chaplin a écrit : > > On Sat, 2008-03-01 at 17:59 +0100, Bruno Coudoin wrote: > > > In the GooCanvasItemSimple, the fill-color and stroke-color are write > > > only. We have a use case in GCompris were we let the children save the > > > items, thus we need to read these properties. > > > > > > It there a good reason to have these properties write only ? > > > > The "fill-color" and "stroke-color" properties are convenience > > properties allowing you to use color names like "red". But these names > > are immediately converted to RGB values and the strings aren't kept. > > > > Can you use "fill-color-rgba" instead? That works with RGBA values > > directly and is read/write. > > Sorry for my late reply, yes I want to use the RGBA values but these > props are WRITEONLY in the 0.9 tarball. I did not found the CVS to check > further, is it somewhere ?. You're right - they are WRITEONLY convenience properties as well. I'd suggest using g_object_set_data() to store the color names/values with the items. Damon |