This should fix the clipping problem.  I'm going to commit it into
the devel tree and if noone finds it to cause trouble it can be 
placed in the stable tree.

--
Brian
? .deps
? .libs
? Makefile
? X.la
? box.lo
? buffer.lo
? color.lo
? fillscreen.lo
? gtext.lo
? hline.lo
? line.lo
? misc.lo
? mode.lo
? pixel.lo
? visual.lo
? vline.lo
? helper/Makefile
? helper/dbe/.deps
? helper/dbe/.libs
? helper/dbe/Makefile
? helper/dbe/dbe.lo
? helper/dbe/helper_x_dbe.la
? helper/dga/.deps
? helper/dga/.libs
? helper/dga/Makefile
? helper/dga/dga.lo
? helper/dga/helper_x_dga.la
? helper/evi/.deps
? helper/evi/.libs
? helper/evi/Makefile
? helper/evi/evi.lo
? helper/evi/helper_x_evi.la
? helper/shm/.deps
? helper/shm/.libs
? helper/shm/Makefile
? helper/shm/helper_x_shm.la
? helper/shm/shm.lo
? helper/vidmode/.deps
? helper/vidmode/.libs
? helper/vidmode/Makefile
? helper/vidmode/helper_x_vidmode.la
? helper/vidmode/vidmode.lo
Index: misc.c
===================================================================
RCS file: /cvsroot/ggi/ggi-core/libggi/display/X/misc.c,v
retrieving revision 1.9
diff -U2 -r1.9 misc.c
--- misc.c      8 Sep 2002 21:37:44 -0000       1.9
+++ misc.c      20 Jan 2003 18:23:29 -0000
@@ -474,4 +474,5 @@
        char str[256];
        int i, w, h;
+       GC pixgc;
 
        priv = GGIX_PRIV(vis);
@@ -486,10 +487,15 @@
                                w * 256, h, 
                                priv->vilist[priv->viidx].vi->depth);
-       XSetForeground(priv->disp, priv->tempgc, 0);
-       XFillRectangle(priv->disp, fontpix, priv->tempgc, 
+
+       pixgc = XCreateGC(priv->disp, priv->win, 0, 0);
+       XSetFont(priv->disp, pixgc, priv->textfont->fid);
+       _ggi_x_set_xclip(priv->disp, pixgc, 0, 0, w * 256, h);
+       XSetForeground(priv->disp, pixgc, 0);
+
+       XFillRectangle(priv->disp, fontpix, pixgc, 
                       0, 0, w * 256, h);
-       XSetForeground(priv->disp, priv->tempgc, ~0);
+       XSetForeground(priv->disp, pixgc, ~0);
        for (i = 0; i < 256; i++) str[i] = i;
-       XDrawString(priv->disp, fontpix, priv->tempgc, 
+       XDrawString(priv->disp, fontpix, pixgc, 
                    0, priv->textfont->max_bounds.ascent, 
                    str, 256);
@@ -497,4 +503,5 @@
        priv->fontimg = XGetImage(priv->disp, fontpix, 0, 0, 
                                  w * 256, h, AllPlanes, ZPixmap);
+       XFreeGC(priv->disp, pixgc);
 
        /* Reverse endianness if needed. */

Reply via email to