kernel/source/console/fallback/fallbackconsole.cpp
// the x/y coords here are in pixel units!
the x/y coords here are in pixel units!
the x / y coords here are in pixel units!
static void draw(char c, int x, int y, uint32_t fg, uint32_t bg)
	{
		if(!c) return;
		x += PaddingX;
		y += PaddingY;
		if(c == ' ' || c > 126)
		{
			for(int i = y; i < (y + CharHeight); i++)
				krt::util::memfill4b((uint32_t*) (Framebuffer + (i * FramebufferScanWidth + x) * 4), bg, CharWidth);
		}
		uint32_t* rowAddress = (uint32_t *) Framebuffer + x + (y * FramebufferScanWidth);
		for(int row = 0; row < FontHeight; row++)
		{
			uint8_t data = TheFont[(int) c][row];
			uint32_t* columnAddress = rowAddress;
			int col = 0;
			for(data = TheFont[(int) c][row]; col < FontWidth; data <<= 1, col++)
			{
				if((data & 0x80) != 0)  *columnAddress = fg;
				else                    *columnAddress = bg;
				columnAddress++;
			}
			rowAddress += FramebufferScanWidth;
		}
	}
static void draw ( char c , int x , int y , uint32_t fg , uint32_t bg ) { if ( ! c ) return ; x += PaddingX ; y += PaddingY ; if ( c == ' ' || c > 126 ) { for ( int i = y ; i < ( y + CharHeight ) ; i ++ ) krt :: util :: memfill4b ( ( uint32_t * ) ( Framebuffer + ( i * FramebufferScanWidth + x ) * 4 ) , bg , CharWidth ) ; } uint32_t * rowAddress = ( uint32_t * ) Framebuffer + x + ( y * FramebufferScanWidth ) ; for ( int row = 0 ; row < FontHeight ; row ++ ) { uint8_t data = TheFont [ ( int ) c ] [ row ] ; uint32_t * columnAddress = rowAddress ; int col = 0 ; for ( data = TheFont [ ( int ) c ] [ row ] ; col < FontWidth ; data <<= 1 , col ++ ) { if ( ( data & 0x80 ) != 0 ) * columnAddress = fg ; else * columnAddress = bg ; columnAddress ++ ; } rowAddress += FramebufferScanWidth ; } }
the x/y coords here are in pixel units!
the x / y coords here are in pixel units!