Re: drawing in a for-loop
- From: Carlo Agrusti <carlo-ag libero it>
- To: gtk-list gnome org
- Subject: Re: drawing in a for-loop
- Date: Fri, 25 Feb 2005 09:20:22 +0100
Ian Strascina ha scritto lo scorso 24/02/2005 23:18:
OK, this is probably the stupidest post ever, but I need help drawing in
a for-loop within a callback function... I've done this before, but for
some reason, I'm not getting expose events to refresh my
GtkDrawingArea... My code looks like this (using gtkmm, but doesn't
matter)...
void mainWindow::button_callback()
{
//GtkDrawingArea is called '* area'
width = GTK_WIDGET(area)->allocation.width;
height = " " ".height;
for (int i=0; i<200; i++)
{
gdk_draw_point(this->pixmap,GTK_WIDGET(area)->style->black_gc,i,i);
gtk_widget_queue_draw_area((GtkWidget *) area,0,0,width,height);
while (gtk_events_pending ())
{
gtk_main_iteration ();
}
delay-for-a-split-second();
}
}
[..]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]