Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
Re: Gtk and root window
Detlef Reichl
2/18/2006 9:26:00 PM
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://b...
> Usuário GNU/Linux no. 224050
>
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Gtk and root window
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password