libseed-list GooCanvas bindings



Hi Jonatan

If it's like GTK, wouldn't the rect be attached to the canvas instead of
the other way round? 

I've had a quick google and amended the code and it was displayed
something (sorry, I've never used gooCanvas before and new to Seed
myself so not sure if this is what you should you require)  

var goo = imports.gi.GooCanvas;
  var gtk = imports.gi.Gtk;
  gtk.init(0,0);

  var w = new gtk.Window();
  var canvas = new goo.Canvas();
  w.add(canvas);
  canvas.set_bounds(0,0,1000,1000);
  canvas.set_size_request(500,500);
	root = canvas.get_root_item();

 var rect = new goo.CanvasRect({
    parent:root,
    x:10,y:10,
    width:100,height:100,
    line_width:5,
    stroke_color:"blue"
  });

  canvas.set_root_item(rect)

  w.show_all();
  gtk.main();



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