From: Detlef Reichl Date: 2006-02-19T06:26:23+09:00 Subject: Re: Gtk and root window Am Sonntag, den 19.02.2006, 05:19 +0900 schrieb Eustaquio Rangel de Oliveira J: > > Hi, > > Hi, thanks for your quick answer! > > > with > > Gdk::Window.default_root_window > > you get the root window, which you can use with all > > Gdk drawing > > functions. > > I'm kind of new on this Ruby graphics thing, I'm > searching for some examples but I'm not finding some > very clear. > Could you please show me how to draw a rectangle on > the screen (on root window or even on a gtk window)? > If I have a starting point will be easier to go on and > not bore you more with this kind of thing. :-) > require 'gtk2' Gtk.init win = Gdk::Window.default_root_window gc = Gdk::GC.new win win.draw_rectangle gc, true, 100, 100, 300, 400 Gtk.main Hi, i don't think that you will get much of it, if you don't understand how X drawing works. To get into the drawing concepts of Gdk the "X lib programming manual" is the best starting point, even if it is quite hard. I don't know of a better tutorial. Cheers detlef > Thanks again! > > ---------------------------- > Eust叩quio "TaQ" Rangel > eustaquiorangel@yahoo.com > http://beam.to/taq > Usu叩rio GNU/Linux no. 224050 >