rpi4-osdev/part12-wgt/wpixel.c
2021-03-07 19:07:08 +00:00

17 lines
337 B
C

#include "wgt.h"
unsigned int wgetpixel (short x, short y)
{
return abuf[y * WGT_SYS.xres + x];
}
void wputpixel (short x, short y)
{
if ((y <= by) & (x <= bx) & (y >= ty) & (x >= tx))
abuf[y * WGT_SYS.xres + x] = currentcolor;
}
void wfastputpixel (short x, short y)
{
abuf[y * WGT_SYS.xres + x] = currentcolor;
}