gdk drawing funks
- From: Stefan Ottosson <ottosson canit se>
- To: gtk-list redhat com
- Subject: gdk drawing funks
- Date: Thu, 16 Oct 1997 06:12:57 +0200 (MET DST)
hi,
I'm trying to make use of gdks drawing funktions.
All I want to do is draw a rectangle on the toplevel window.
Here's what I tried to do, this generates a "drawable != null" message..
int main(int argc, char **argv)
{
GtkWidget *topwin;
GtkWidget *canvas;
gtk_init(&argc, &argv);
topwin = gtk_window_new(GTK_WINDOW_TOPLEVEL);
canvas = gtk_drawing_area_new();
gtk_drawing_area_size(GTK_DRAWING_AREA(canvas), 200, 200);
gtk_widget_show(canvas);
gtk_container_add(GTK_CONTAINER(topwin), canvas);
gdk_draw_rectangle(canvas->window, canvas->style->black_gc, TRUE, 10, 10,
80, 50);
gtk_widget_show(topwin);
gtk_main();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]