Re: canvas text items



>  What is the correct way to create a text item for a gnome canvas?

GnomeCanvasItem *item;

item = gnome_canvas_item_new (some_group,
			      gnome_canvas_text_get_type (),
			      "x", 5.0,
			      "y", 10.0,
			      "text", "Hello, World!",
			      "font", "10x20",
			      "fill_color", "black",
			      "anchor", GTK_ANCHOR_NE,
			      NULL);

The attributes supported by the canvas text item are listed in
gnome-canvas-text.h.

  Federico



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