- mark = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
- gnome_canvas_polygon_get_type(),
- "points", points,
- "fill_color_rgba", rgba,
- "outline_color", "black",
- NULL);
-
- string fontname = get_font_for_style (N_("MarkerText"));
-
- text = gnome_canvas_item_new (GNOME_CANVAS_GROUP(group),
- gnome_canvas_text_get_type (),
- "text", annotation.c_str(),
- "x", label_offset,
- "y", 0.0,
- "font", fontname.c_str(),
- "anchor", GTK_ANCHOR_NW,
- "fill_color", "black",
- NULL);
-
- gtk_object_set_data (GTK_OBJECT(group), "marker", this);
+ mark = new Gnome::Canvas::Polygon (*group);
+ mark->set_property ("points", points);
+ mark->set_property ("fill_color_rgba", rgba);
+ mark->set_property ("outline_color", Gdk::Color ("black"));
+
+ Pango::FontDescription font = get_font_for_style (N_("MarkerText"));
+
+ text = new Gnome::Canvas::Text (*group);
+ text->set_property ("text", annotation.c_str());
+ text->set_property ("x", label_offset);
+ text->set_property ("y", 0.0);
+ text->set_property ("fontdesc", font);
+ text->set_property ("anchor", Gtk::ANCHOR_NW);
+ text->set_property ("fill_color", Gdk::Color ("black"));
+
+ group->set_data ("marker", this);