Subversion Repositories Kolibri OS

Rev

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

Rev 7773 Rev 7780
Line 297... Line 297...
297
	PutPixel(x,     y+h, dark);
297
	PutPixel(x,     y+h, dark);
298
	PutPixel(x+w+1, y+1, light);
298
	PutPixel(x+w+1, y+1, light);
299
	PutPixel(x+w+1, y+h, dark);	
299
	PutPixel(x+w+1, y+h, dark);	
300
}
300
}
Line 301... Line 301...
301
 
301
 
302
:bool is_the_skin_dark()
302
:bool skin_is_dark()
-
 
303
{
303
{
304
	dword gray;
-
 
305
	dword color_image = #system.color.work;
304
	dword bg_col = system.color.work;
306
 
-
 
307
	gray = DSBYTE[color_image]*DSBYTE[color_image];
-
 
308
	gray += DSBYTE[color_image+1]*DSBYTE[color_image+1];
-
 
309
	gray += DSBYTE[color_image+2]*DSBYTE[color_image+2];
-
 
310
	gray = sqrt(gray) / 3;
-
 
311
 
305
	if (GrayScaleImage(#bg_col,1,1)<65) {
312
	if (gray < 65) {
306
		return true; 
313
		return true; 
307
	} else {
314
	} else {
308
		return false;
315
		return false;
309
	}
316
	}