I was using cairo_rectangle() for drawing waterfall, but perhaps doing it with GDK-PixBuf is more efficient.
rowstride = gdk_pixbuf_get_rowstride (pixbuf); for(int i=0;i<i_max;i++) { p = gdk_pixbuf_get_pixels(pixbuf) + i * rowstride; for(int j=0;j<j_max;j++) { double tmp = waterfall[i][j]; *p++ = colormap_r(tmp); *p++ = colormap_g(tmp); *p++ = colormap_b(tmp); } }
gdk_pixbuf_composite() is used with non 1.0 scaling factors to get a smooth image.