Subversion Repositories Kolibri OS

Rev

Rev 5759 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5759 Rev 5761
Line 242... Line 242...
242
		IF(DSBYTE[text1]=='_') len--;
242
		IF(DSBYTE[text1]=='_') len--;
243
		len+=symbol(len,DSBYTE[text1]);
243
		len+=symbol(len,DSBYTE[text1]);
244
		IF(weight)len+=math.ceil(size.text/17);
244
		IF(weight)len+=math.ceil(size.text/17);
245
		text1++;
245
		text1++;
246
	}
246
	}
-
 
247
	IF (no_bg_copy) && (!color) SmoothFont(buffer, size.width, size.height);
247
	_PutImage(x,y,size.width,size.height,buffer);
248
	_PutImage(x,y,size.width,size.height,buffer);
248
	return len;
249
	return len;
249
}
250
}
-
 
251
inline fastcall dword b24(EBX) { return DSDWORD[EBX] << 8; }
-
 
252
:void SmoothFont(dword color_image, w, h)
-
 
253
{
-
 
254
	byte rr,gg,bb;
-
 
255
	dword i,line_w,to, pixel;
-
 
256
	line_w = w * 3;
-
 
257
	to = w*h*3 + color_image - line_w - 3;
-
 
258
	for (i = color_image; i < to; i+=3)	{
-
 
259
		if (i-color_image%line_w +3 == line_w) continue;
-
 
260
		if (b24(i)==0x000000) && (b24(i+3)!=0x000000) && (b24(i+line_w)!=0x000000) && (b24(i+3+line_w)==0x000000)
-
 
261
		{ 
-
 
262
			ShadowImage(i+3, 1, 1, 2);
-
 
263
			ShadowImage(i+line_w, 1, 1, 2);
-
 
264
		}
-
 
265
		else if (b24(i)!=0x000000) && (b24(i+3)==0x000000) && (b24(i+line_w)==0x000000) && (b24(i+3+line_w)!=0x000000)
-
 
266
		{
-
 
267
			ShadowImage(i, 1, 1, 2);
-
 
268
			ShadowImage(i+3+line_w, 1, 1, 2);
-
 
269
		}
-
 
270
	}
-
 
271
}
250
:dword FONT::textarea(word x,y;dword text1,c;byte size)
272
:dword FONT::textarea(word x,y;dword text1,c;byte size)
251
{
273
{
Line 252... Line 274...
252
	
274