Nightly update (ISO SHA-1 f3615ad)
This commit is contained in:
1 parent
b97fa7c00e
commit
aa53888517
20 files changed
+366
-235
No files matched your search
@@ -858,19 +858,36 @@ public I64 GrPutChar(CDC *dc=gr.dc,I64 x,I64 y,U8 ch)
|
||||
|
||||
I64 GrPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
{//Use $LK,"GrPrint",A="MN:GrPrint"$()
|
||||
I64 x0,ch,res;
|
||||
I64 x0,sx=0,sy=0,res;
|
||||
if (!_s) return 0;
|
||||
x0=x;
|
||||
res=0;
|
||||
while (ch=*_s++) {
|
||||
if (ch=='\n') {
|
||||
while (*_s) {
|
||||
if (*_s=='\n') {
|
||||
x=x0;
|
||||
y+=FONT_HEIGHT;
|
||||
} else if (ch=='\t')
|
||||
_s++;
|
||||
} else if (*_s=='\t') {
|
||||
x=x0+CeilU64(x-x0+FONT_WIDTH,8*FONT_WIDTH);
|
||||
else {
|
||||
res+=GrPutChar(dc,x,y,ch);
|
||||
_s++;
|
||||
} else if (*_s(U32 *)=='$$SY,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sy='0'-_s[4];
|
||||
} else
|
||||
sy=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else if (*_s(U32 *)=='$$SX,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sx='0'-_s[4];
|
||||
} else
|
||||
sx=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else {
|
||||
res+=GrPutChar(dc,x+sx,y+sy,*_s);
|
||||
x+=FONT_WIDTH;
|
||||
_s++;
|
||||
}
|
||||
}
|
||||
return res;
|
||||
@@ -878,20 +895,36 @@ I64 GrPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
|
||||
I64 GrVPutS(CDC *dc=gr.dc,I64 x,I64 y,U8 *_s)
|
||||
{//Vertical Text. Use $LK,"GrVPrint",A="MN:GrVPrint"$()
|
||||
I64 y0,res;
|
||||
I64 y0,sx=0,sy=0,res;
|
||||
U8 buf[2];
|
||||
if (!_s) return 0;
|
||||
y0=y;
|
||||
res=0;
|
||||
|
||||
buf[1]=0;
|
||||
while (*buf=*_s++) {
|
||||
if (*buf=='\n') {
|
||||
while (*_s) {
|
||||
if (*_s=='\n') {
|
||||
y=y0;
|
||||
x+=FONT_WIDTH;
|
||||
} else if (*buf=='\t')
|
||||
_s++;
|
||||
} else if (*_s=='\t') {
|
||||
y=y0+CeilU64(y-y0+FONT_HEIGHT,8*FONT_HEIGHT);
|
||||
else {
|
||||
_s++;
|
||||
} else if (*_s(U32 *)=='$$SY,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sx='0'-_s[4];
|
||||
} else
|
||||
sx=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else if (*_s(U32 *)=='$$SX,') {
|
||||
if (_s[4]=='-') {
|
||||
_s++;
|
||||
sy='0'-_s[4];
|
||||
} else
|
||||
sy=_s[4]-'0';
|
||||
_s+=6;
|
||||
} else {
|
||||
*buf=*_s++;
|
||||
res+=GrPutS(dc,x,y,buf);
|
||||
y+=FONT_HEIGHT;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user