+ if (require_clipping)
+ {
+ Region region; /* Region used for setting clip mask to GC. */
+ XPoint x[4]; /* Data used for creating REGION. */
+
+ x[0].x = x[3].x = left, x[1].x = x[2].x = left + glyph_width;
+ x[0].y = x[1].y = top, x[2].y = x[3].y = top + line_height;
+ region = XPolygonRegion (x, 4, EvenOddRule);
+ XSetRegion (FRAME_X_DISPLAY (f), gc, region);
+ XDestroyRegion (region);
+ }
+
+ if (!cmpcharp)
+ {
+ if (require_clipping)
+ for (i = 0; i < len; i++)
+ {
+ if (i > 0)
+ XSetClipOrigin (FRAME_X_DISPLAY (f), gc,
+ glyph_width * i, 0);
+ if (background_filled)
+ XDrawString16 (FRAME_X_DISPLAY (f), window, gc,
+ left + glyph_width * i,
+ top + baseline, buf + i, 1);
+ else
+ XDrawImageString16 (FRAME_X_DISPLAY (f), window, gc,
+ left + glyph_width * i,
+ top + baseline, buf + i, 1);
+ }
+ else
+ {
+ if (background_filled)
+ XDrawString16 (FRAME_X_DISPLAY (f), window, gc,
+ left, top + baseline, buf, len);
+ else
+ XDrawImageString16 (FRAME_X_DISPLAY (f), window, gc,
+ left, top + baseline, buf, len);
+ }
+ }
+ else