Re: [gtk-list] Data conversion to Image
- From: RNG <r gasch chello nl>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Data conversion to Image
- Date: Sat, 4 Dec 1999 16:24:19 +0100
Hi,
you might want to investigate using
gdk_draw_rgb_image ()
which lets you draw a buffer directly to the screen ... it's
a lot faster than using gdk_draw_point () ...
Greetings
--> R
> //Plot the image one pixel at a time
> for(x=0;x<XSIZE;x++)
> for(y=0;y<YSIZE;y++)
> {
> int col = colorfunc(data[x][y]); // Select which color
> from colmap to use for this pixel
> // Set the foreground color
>
> gdk_gc_set_foreground(style->dark_gc[GTK_STATE_NORMAL],colmap+col);
> // Plot the point
>
> gdk_draw_point(GTK_WIDGET(draw)->window,style->dark_gc[GTK_STATE_NORMAL],x,y);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]