Re: rounded rectangles problem

Jan Hudec said:
On Wed, Aug 10, 2005 at 13:56:18 -0400, James Muir wrote:
Hi All,

I'm trying to subclass Gnome2::Canvas::Shape to get a rounded rectangle.
No success yet. I need to set the Bpath for the shape. As far as I can
tell the pathdef can not be set up in INIT_INSTANCE as this is too soon
and the properties have not been passed in. I'm not sure if it's OK to

So set it up in SET_PROPERTY. Whenever some of the properties affecting the
shape is set, look whether all the others are defined, and if they are, set
the shape. SET_PROPERY /is/ called for default values if not explicitly
specified, so you can be sure all the properties will be set before the
object is shown.

Erm, no, SET_PROPERTY is not called for values that default -- only if there
is a property to set.  You can usually set a default value in INIT_INSTANCE. 
For a pathdef property, you should at least be able to create an empty pathdef
which you later replace when SET_PROPERTY is called.

muppet <scott at asofyet dot org>

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]