/** * Wraps the ExtTextOut function. * <p> * * @param gc the gc to use for rendering * @param renderBuffer the glyphs to render as an array of characters * @param renderDx the width of each glyph in renderBuffer * @param x x position to start rendering * @param y y position to start rendering */ public static void drawGlyphs(GC gc, char[] renderBuffer, int[] renderDx, int x, int y) { int length = renderDx.length; if (!OS.IsWinCE && OS.WIN32_VERSION >= OS.VERSION(4, 10)) { if (OS.GetLayout (gc.handle) != 0) { reverse(renderDx); renderDx[length-1]--; //fixes bug 40006 reverse(renderBuffer); } } // render transparently to avoid overlapping segments. fixes bug 40006 int oldBkMode = OS.SetBkMode(gc.handle, OS.TRANSPARENT); OS.ExtTextOutW(gc.handle, x, y, ETO_GLYPH_INDEX , null, renderBuffer, renderBuffer.length, renderDx); OS.SetBkMode(gc.handle, oldBkMode); } /**