summaryrefslogtreecommitdiff
path: root/userspace/xterm/rect.c
blob: 88638cdc4e19829375f677193c341c71099c4690 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdlib.h>
#include <stdio.h>
#include "vesa.h"

extern char**environ;

int main(int argc, char **argv)
{
    // we need a window
    _gui_win(0xffffffff,300<<16|300,0);
    uint8_t *fb=malloc(4*300*300);

    // basically loads font and sets a few constants
    vesa_init(300,300,fb,NULL);

    while(1)
    {
        int x = rand()%300;
        int y = rand()%300;
        int col = rand()% 0x0000ff;

        int width=1;
        int height=1;

        //put_rect( x, y, width,height,col);
        PutPixel(x,y,col|0xff<<24);
        _gui_inval((x<<16)|(y),(width<<16)|height,fb);
    }
}