1823 |
{\ |
{\ |
1824 |
glyph = cache_get_font (font, ttext[idx]);\ |
glyph = cache_get_font (font, ttext[idx]);\ |
1825 |
if (!(flags & TEXT2_IMPLICIT_X))\ |
if (!(flags & TEXT2_IMPLICIT_X))\ |
1826 |
|
{\ |
1827 |
|
xyoffset = ttext[++idx];\ |
1828 |
|
if ((xyoffset & 0x80))\ |
1829 |
{\ |
{\ |
1830 |
xyoffset = ttext[++idx];\ |
if (flags & TEXT2_VERTICAL)\ |
1831 |
if ((xyoffset & 0x80))\ |
y += ttext[idx+1] | (ttext[idx+2] << 8);\ |
|
{\ |
|
|
if (flags & TEXT2_VERTICAL) \ |
|
|
y += ttext[idx+1] | (ttext[idx+2] << 8);\ |
|
|
else\ |
|
|
x += ttext[idx+1] | (ttext[idx+2] << 8);\ |
|
|
idx += 2;\ |
|
|
}\ |
|
1832 |
else\ |
else\ |
1833 |
{\ |
x += ttext[idx+1] | (ttext[idx+2] << 8);\ |
1834 |
if (flags & TEXT2_VERTICAL) \ |
idx += 2;\ |
|
y += xyoffset;\ |
|
|
else\ |
|
|
x += xyoffset;\ |
|
|
}\ |
|
1835 |
}\ |
}\ |
1836 |
if (glyph != NULL)\ |
else\ |
1837 |
{\ |
{\ |
1838 |
ui_draw_glyph (mixmode, x + glyph->offset,\ |
if (flags & TEXT2_VERTICAL)\ |
1839 |
y + glyph->baseline,\ |
y += xyoffset;\ |
1840 |
glyph->width, glyph->height,\ |
else\ |
1841 |
glyph->pixmap, 0, 0, bgcolour, fgcolour);\ |
x += xyoffset;\ |
|
if (flags & TEXT2_IMPLICIT_X)\ |
|
|
x += glyph->width;\ |
|
1842 |
}\ |
}\ |
1843 |
|
}\ |
1844 |
|
if (glyph != NULL)\ |
1845 |
|
{\ |
1846 |
|
x1 = x + glyph->offset;\ |
1847 |
|
y1 = y + glyph->baseline;\ |
1848 |
|
XSetStipple(g_display, g_gc, (Pixmap) glyph->pixmap);\ |
1849 |
|
XSetTSOrigin(g_display, g_gc, x1, y1);\ |
1850 |
|
FILL_RECTANGLE_BACKSTORE(x1, y1, glyph->width, glyph->height);\ |
1851 |
|
if (flags & TEXT2_IMPLICIT_X)\ |
1852 |
|
x += glyph->width;\ |
1853 |
|
}\ |
1854 |
} |
} |
1855 |
|
|
1856 |
void |
void |
1860 |
int fgcolour, uint8 * text, uint8 length) |
int fgcolour, uint8 * text, uint8 length) |
1861 |
{ |
{ |
1862 |
FONTGLYPH *glyph; |
FONTGLYPH *glyph; |
1863 |
int i, j, xyoffset; |
int i, j, xyoffset, x1, y1; |
1864 |
DATABLOB *entry; |
DATABLOB *entry; |
1865 |
|
|
1866 |
SET_FOREGROUND(bgcolour); |
SET_FOREGROUND(bgcolour); |
1874 |
FILL_RECTANGLE_BACKSTORE(clipx, clipy, clipcx, clipcy); |
FILL_RECTANGLE_BACKSTORE(clipx, clipy, clipcx, clipcy); |
1875 |
} |
} |
1876 |
|
|
1877 |
|
SET_FOREGROUND(fgcolour); |
1878 |
|
SET_BACKGROUND(bgcolour); |
1879 |
|
XSetFillStyle(g_display, g_gc, FillStippled); |
1880 |
|
|
1881 |
/* Paint text, character by character */ |
/* Paint text, character by character */ |
1882 |
for (i = 0; i < length;) |
for (i = 0; i < length;) |
1883 |
{ |
{ |
1928 |
break; |
break; |
1929 |
} |
} |
1930 |
} |
} |
1931 |
|
|
1932 |
|
XSetFillStyle(g_display, g_gc, FillSolid); |
1933 |
|
|
1934 |
if (g_ownbackstore) |
if (g_ownbackstore) |
1935 |
{ |
{ |
1936 |
if (boxcx > 1) |
if (boxcx > 1) |