Beispiel #1
0
/*
 * Basic graphics routines.
 */
void gfx_hline(int x1, int x2, int y, int color, int flags)
{
    int x;
    
    if (flags & GFX_XOR_PIXEL)
    {
        for (x = x1; x < x2; x++)
        {
            vga_setcolor(color ^ vga_getpixel(x, y));
            vga_drawpixel(x, y);
        }
    }
    else
    {
        vga_setcolor(color);
        for (x = x1; x < x2; x++)
            vga_drawpixel(x, y);
    }
}
Beispiel #2
0
void gfx_vline(int y1, int y2, int x, int color, int flags)
{
    int y;
    
    if (flags & GFX_XOR_PIXEL)
    {
        for (y = y1; y < y2; y++)
        {
            vga_setcolor(color ^ vga_getpixel(x, y));
            vga_drawpixel(x, y);
        }
    }
    else
    {
        vga_setcolor(color);
        for (y = y1; y < y2; y++)
            vga_drawpixel(x, y);
    }
}
Beispiel #3
0
static PIXELVAL
SVGA_readpixel(PSD psd,COORD x, COORD y)
{
	return vga_getpixel(x, y);
}