Re: [Goocanvas-devel] fill/stroke_color_rgba on 32-bit machines using python bindings
- From: Brandon Lewis <brandon_lewis berkeley edu>
- To: Bruno Coudoin <bruno coudoin free fr>
- Cc: goocanvas-list gnome org, goocanvas-devel <goocanvas-devel lists sourceforge net>
- Subject: Re: [Goocanvas-devel] fill/stroke_color_rgba on 32-bit machines using python bindings
- Date: Sat, 25 Apr 2009 11:05:01 -0700
Bruno Coudoin wrote:
Le vendredi 17 avril 2009 à 00:20 -0700, Brandon Lewis a écrit :
I am having some difficulty with setting colors on goocanvas objects on 32-bit
machines. Essentially what I do is pack the values from a gtk.gdk.Color object
into a 32-bit word and assign it to the fill/stroke color properties.
The problem is that on 32-bit machines, some color values exceed python's limit
on the size of an int (since it has no unsigned type) and get promoted to longs.
When this happens, the goocanvas bindings can't convert the value (which is
still only 32-bits wide)
Anyone have any suggestions on how to deal with this?
You can force python to set a long value by appending an L at the end of
the value like in color_rgba= 0xF44B9DFFL
But then goocanvas will reject it. All this does is specify that the literal
value is a long. The issue is that goocanvas refuses to convert python longs to
ints even when the value would fit within 32-bits.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]