diff options
author | Behdad Esfahbod <behdad@behdad.org> | 2009-03-16 16:03:36 -0400 |
---|---|---|
committer | Behdad Esfahbod <behdad@behdad.org> | 2009-03-16 16:03:36 -0400 |
commit | a6af36b9c06b81ab8095afff85f68f37c27a4b3b (patch) | |
tree | 30b65815bc952511b541b66c7ee7c015a1ffe935 /pango-view/viewer-x.c | |
parent | 2599e265eba6fd27b3f7684c484f3160f9a67595 (diff) | |
download | pango-a6af36b9c06b81ab8095afff85f68f37c27a4b3b.tar.gz |
Bug 502805 – pango-view option for foreground/background color
Diffstat (limited to 'pango-view/viewer-x.c')
-rw-r--r-- | pango-view/viewer-x.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/pango-view/viewer-x.c b/pango-view/viewer-x.c index 25492f33..89864c08 100644 --- a/pango-view/viewer-x.c +++ b/pango-view/viewer-x.c @@ -66,10 +66,18 @@ x_view_create_surface (gpointer instance, { XViewer *x = (XViewer *) instance; Pixmap pixmap; + GC gc; pixmap = XCreatePixmap (x->display, DefaultRootWindow (x->display), width, height, DefaultDepth (x->display, x->screen)); + gc = XCreateGC (x->display, pixmap, 0, NULL); + + XSetForeground (x->display, gc, WhitePixel (x->display, x->screen)); + XFillRectangle (x->display, pixmap, gc, 0, 0, width, height); + + XFreeGC (x->display, gc); + return (gpointer) pixmap; } |