How to fix the GnomeCanvasItem?



The coordinate of GnomeCanvasItemText will change when I resize the main window. I want to draw it at (10,10) pixel on the canvas. How can I do?

  GtkWidget *app;
  GtkWidget *hbox;
  GnomeCanvas *canvas;
  GnomeCanvasItem *item;
  hbox=gtk_hbox_new(FALSE,0);
  canvas=(GnomeCanvas *)gnome_canvas_new();
  gtk_box_pack_start(GTK_BOX(hbox),(GtkWidget *)canvas,TRUE,TRUE,0);
  item=gnome_canvas_item_new(gnome_canvas_root(canvas),GNOME_TYPE_CANVAS_TEXT,"text","hello","x",10.0,"y",10.0,NULL);
  gnome_app_set_contents(GNOME_APP(app),hbox);





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