Re: line drawing...
| From: | Steph | Date: | Thu, 24 May 2001 03:31:19 +0000 |
| Subject: | Re: line drawing... | ||
| References: | 1 | Groups: | php.gtk |
| Request: | Send a blank email to php-gtk+get-1907@lists.php.net to get a copy of this message | ||
I have it.
<?
dl('php_gtk.' . (strstr(PHP_OS, 'WIN') ? 'dll' : 'so')) ||
die("Can't load php_gtk module!\n");
function quitApplication() {
Gtk::main_quit();
}
function expose_event($drawingarea, $event) {
$style = $drawingarea->get_style();
$black_gc = $style->black_gc;
gdk::draw_line($drawingarea->window, $black_gc, 15, 15, 145, 145);
}
$window = &new GtkWindow();
$window->set_title("testbay window");
$window->set_default_size(320, 200);
$window->set_uposition(0, 0);
$window->connect('delete_event', 'quitApplication');
$window->realize();
$drawingarea = &new GtkDrawingArea();
$drawingarea->set_usize(320, 200);
$window->add($drawingarea);
$drawingarea->show();
$drawingarea->connect('expose_event', 'expose_event');
$drawingarea->add_events(GDK_EXPOSURE_MASK);
$window->show_all();
Gtk::main();
?>
Can I go to sleep now?
;)
----- Original Message -----
From: "Julia A. Case" <julie@MageNet.com>
To: <php-gtk@lists.php.net>
Sent: Thursday, May 24, 2001 2:29 AM
Subject: [PHP-GTK] line drawing...
Can someone help me draw lines on the screen? I've tried
$window->draw_line ( ) but I get a parse error on the draw_line part, is
this not supported yet?
Julia
--
[ Julia Anne Case ] [ Ships are safe inside the harbor, ]
[Programmer at large] [ but is that what ships are really for. ]
[ Admining Linux ] [ To thine own self be true. ]
[ Windows/WindowsNT ] [ Fair is where you take your cows to be judged. ]
--
PHP GTK Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
For additional commands, e-mail: php-gtk-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net