Created
December 19, 2009 17:02
-
-
Save bert/260147 to your computer and use it in GitHub Desktop.
Grey drawing area snippet
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| width = DrawingArea->allocation.width; | |
| height = DrawingArea->allocation.height; | |
| rgbbuf = malloc (width * height * 3); | |
| memset (rgbbuf, 240, width * height * 3); // set the background to GREY = (240, 240, 240) | |
| //DrawBufferImage (rgbbuf, width, height, data); | |
| gdk_draw_rgb_image (pixmap, | |
| DrawingArea->style->fg_gc[GTK_STATE_NORMAL], | |
| 0, 0, width, height, GDK_RGB_DITHER_NONE, rgbbuf, width*3); | |
| free (rgbbuf); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment