plan 9 kernel history: overview | file list | diff list

1999/1013/port/devdraw.c (diff list | history)

1999/1012/sys/src/9/port/devdraw.c:1928,19341999/1013/sys/src/9/port/devdraw.c:1928,1934 (short | long | prev | next)
1997/1101    
 * On 8 bit displays, load the default color map 
 */ 
void 
1999/1012    
drawcmap(int invert) 
1999/1013    
drawcmap(void) 
1999/1012    
{ 
1997/1101    
	int r, g, b, cr, cg, cb, v; 
	int num, den; 
1999/1012/sys/src/9/port/devdraw.c:1952,19631999/1013/sys/src/9/port/devdraw.c:1952,1959
1999/1012    
				cg = g*num/den; 
				cb = b*num/den; 
1997/1101    
			} 
			if(invert) 
				setcolor(255-i-(j&15), 
					cr*0x01010101, cg*0x01010101, cb*0x01010101); 
			else 
				setcolor(i+(j&15), 
					cr*0x01010101, cg*0x01010101, cb*0x01010101); 
1999/1013    
			setcolor(i+(j&15), 
				cr*0x01010101, cg*0x01010101, cb*0x01010101); 
1999/1012    
		    } 
1997/1101    
	} 
} 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)