99 int next, next1, bwidth, cwidth;
101 int ynow, xw, cx, xn, bcnt;
102 unsigned short rotbuf[16], *ctab;
103 unsigned short z, z1, imask;
104 unsigned char cbuf, omask;
105 unsigned char mask[22];
108 union {
unsigned short color2;
unsigned char c[2]; }
c;
110 if (scale < 1 || scale > 10)
return;
111 if (text ==
NULL)
return;
113 if (degrees >= 90) degrees /= 90;
120 outpw(0x3ce,
c.color2 & 0xff00);
126 cwidth = fwidth*scale;
129 y -= strlen(text)*fheight*scale;
137 y -= strlen(text)*fheight*scale;
144 cwidth = fwidth*scale;
147 x -= strlen(text)*cwidth;
153 x -= strlen(text)*cwidth;
166 str1 = text + strlen(text);
168 while (str0 != str1) {
169 if (x + cwidth < Xl || x >
Xu) {
170 if (degrees & 4)
break;
177 memset(mask,0xff,bwidth+1);
179 z = (
Xl >> 3) - (x >> 3);
181 mask[z] >>= (
Xl & 7);
183 if (Xu < x + cwidth) {
184 z = (Xu >> 3) - (x >> 3) + 1;
185 memset(mask+z,0,bwidth+1-z);
186 mask[z-1] <<= 8 - (Xu & 7);
190 if ((tx = (*--str1 & 0x7f) -
' ') < 0) tx = 0;
193 if ((tx = (*str0++ & 0x7f) -
' ') < 0) tx = 0;
196 xform_cell(rotbuf,ctab,fwidth,fheight,degrees,fwidth);
197 ctab = rotbuf + fheight - 1;
201 for (i = fheight; i; i--,ctab--) {
202 for (j = scale; j; j--) {
203 if (ynow >=
Yl && ynow <=
Yu) {
208 for (k = fwidth; k; k--) {
209 for (l = scale; l; l--) {
210 if (imask & *ctab) cbuf |= omask;
211 if (!(omask >>= 1)) {
213 cbuf &= mask[bcnt++];
241 for (i = fheight; i; i--, ctab--) {
242 if (ynow >=
Yl && ynow <=
Yu) {
245 *rgen = (*((
char *) &imask + 1) & mask[0]);
249 *rgen = ((char) imask & mask[1]);
255 ((char) (*ctab << (8 - cx)) & mask[2]);