Re: Goocanvas issues
- From: Murray Cumming <murrayc murrayc com>
- To: Paul Davis <pjdavis engineering uiowa edu>
- Cc: list gtkmm <gtkmm-list gnome org>
- Subject: Re: Goocanvas issues
- Date: Mon, 21 May 2007 11:00:11 +0200
On Sun, 2007-05-20 at 18:05 -0500, Paul Davis wrote:
> >
> > In itemsimple.hg, I have this:
> > _WRAP_PROPERTY("fill-pattern",Cairo::RefPtr<Cairo::Pattern>)
> >
> > I'm attempting to use it like such:
> > Cairo::RefPtr<Cairo::Pattern> create_pattern() { ... }
> > item->property_fill_pattern() = create_pattern() ;
> >
> > But its generating this error:
> > (lt-demo:27094): GLib-GObject-WARNING **: unable to set property
> > `fill-pattern' of type `GooCairoPattern' from value of type
> > `glibmm__CustomBoxed_N5Cairo6RefPtrINS_7PatternEEE'
> >
> > I've posted a message on the goocanvas list asking about the
> GooCairo*
> > types. I've also been looking through the properties in Gtkmm that
> use
> > RefPtr's and I can't find anywhwere that they do something special
> to
> > account for the refptr being passed in. (Like making a call to
> > Glib::unwrap or what not).
> >
> > Anyone have an idea?
> >
> > Thanks,
> > Paul Davis
> >
>
> Quick follow up, this piece of code actually works:
>
> Cairo::RefPtr<Cairo::Pattern> p =
> _create_stipple( "mediumseagreen" ) ;
> g_object_set( rect->gobj(), "fill-pattern", p->cobj(), NULL ) ;
>
> So the property is fine taking the Cairo pattern which leads me to
> believe that there's a problem in how that property is getting
> wrapped.
This is probably the first time that Cairo::RefPtr has been used in
properties. I think we need a Property* or Value* template
specialization, as we already have for Glib::RefPtr.
That should probably go in gtkmm, but you can try putting it somewhere
common in libgoocanvasmm for now. Tell me if you don't manage that - I
can try when I have a chance in the next few days.
--
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]