Hi,
I'm playing with goocanvasmm and am finding it impossible to create any custom
area. Reading the docs, the logical method would be to use the Polyline;
however, that in turn relies on the Points class, and I can't seem to create an
instance of that at all. I see Murray Cumming had a try in the demo example;
uncommenting that makes the code noncompilable.
A RefPtr to the Points class causes the compiler to dummy spit; the error
message I get is at the first call to the pointer (in the code below, at the
"my_line1_points = ..." line. The error is
Objects.cpp:131: error: no match for ‘operator=’ in ‘my_line1_points =
Goocanvas::Points()’
Creating an instance without the pointer compiles, but then segfaults when it
gets to the same line.
Glib::RefPtr<Goocanvas::Polyline> my_line1 ;
Glib::RefPtr<Goocanvas::Points> my_line1_points;
// or: Goocanvas::Points my_line1_points; this will compile,
but doesn't seem to accept points.
Glib::RefPtr<Goocanvas::Item> root = _canvas->get_root_item();
my_line1_points = Goocanvas::Points();
my_line1_points.set_coordinate(1, 200, 200);
my_line1_points.set_coordinate(2, 200, 300);
my_line1_points.set_coordinate(3, 250, 250);
my_line1 = Goocanvas::Polyline::create(true, my_line1_points) ;
root->add_child( my_line1);
the other possibility I looked at is the constructor which takes a series of
doubles; however, I couldn't find a syntax documented anywhere for them.
Another compiler comment that makes it look like the Points class isn't working
is
/usr/include/glibmm-2.4/glibmm/refptr.h:184: error: ‘class Goocanvas::Points’
has no member named ‘unreference’
So what am I doing wrong? Or am I trying to use the library for something it
isn't designed for?
__________________________________________________________________________________
Get more done like never before with Yahoo!7 Mail.
Learn more: http://au.overview.mail.yahoo.com/_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list