Re: drawing functions

From: Date: Mon, 26 Sep 2005 11:58:19 +0000
Subject: Re: drawing functions
References: 1  Groups: php.gtk.dev php.gtk.general 
Request: Send a blank email to php-gtk-dev+get-1701@lists.php.net to get a copy of this message
Well, I'm pretty sure I know how it _should_ work.... <?php /* working */ $window = new GtkWindow(); $window->connect_object('destroy', array('gtk', 'main_quit')); $window->realize(); /* apparently working */ $drawable = $window->window; $gc = $window->style->white_gc; /* apparently not working, but not throwing errors either */ $drawable->draw_rectangle($gc, true, 4, 4, 580, 340); /* working */ $window->show_all(); gtk::main(); ?> Then again, I haven't tried drawing on an expose event yet. Perhaps if someone tries to update the Scribble demo, we'll know more. ----- Original Message ----- From: "Pablo Dall'Oglio" <pablo@dalloglio.net> To: <php-gtk-dev@lists.php.net> Sent: Monday, September 26, 2005 12:58 AM Subject: [PHP-GTK-DEV] drawing functions > Hello ! > > I didn't realize how to use drawing functions on php-gtk2... This code > gives me an error: > > $a = new GdkGC($gdkwindow); > var_dump($a); > GdkDrawable::draw_rectangle($drawingarea, $a, 4, 4, 580, 340); > > Fatal error: Argument 1 must be an instance of GdkGC.... > > Does someone know how it works ? > > regards > Pablo > -- > :: Pablo Dall'Oglio > :: www.solis.coop.br - Lajeado, RS - Brasil > :: www.dalloglio.net - Personal Home Page > :: The software is free, but the work isn't. > > -- > PHP-GTK Development Mailing List (http://gtk.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.gtk.dev (#1701) next »