X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin2_src%2FWM%2Fvideo.c;h=80e130249dad649d12b1f25d0ce69ad070d08238;hb=85eb17b306404571aa39596946c87ad9bb1d9d13;hp=fb08208587b608dd12ebfd7b7f4584ce142be813;hpb=e61cffb0ef7221e18df8e67cba37a3ec45232275;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin2_src/WM/video.c b/Usermode/Applications/axwin2_src/WM/video.c index fb082085..80e13024 100644 --- a/Usermode/Applications/axwin2_src/WM/video.c +++ b/Usermode/Applications/axwin2_src/WM/video.c @@ -70,9 +70,31 @@ void Video_FillRect(short X, short Y, short W, short H, uint32_t Color) { uint32_t *buf = gpScreenBuffer + Y*giScreenWidth + X; + _SysDebug("Video_FillRect: (X=%i, Y=%i, W=%i, H=%i, Color=%08x)", + X, Y, W, H, Color); + + if(W < 0 || X < 0 || X >= giScreenWidth) return ; + if(X + W > giScreenWidth) W = giScreenWidth - X; + + if(H < 0 || H < 0 || H >= giScreenHeight) return ; + if(Y + H > giScreenHeight) H = giScreenHeight - Y; + while( H -- ) { memset32( buf, Color, W ); buf += giScreenWidth; } } + +void Video_DrawRect(short X, short Y, short W, short H, uint32_t Color) +{ + Video_FillRect(X, Y, W, 1, Color); + Video_FillRect(X, Y+H-1, W, 1, Color); + Video_FillRect(X, Y, 1, H, Color); + Video_FillRect(X+W-1, Y, 1, H, Color); +} + +void Video_DrawText(short X, short Y, short W, short H, void *Font, int Point, uint32_t Color, char *Text) +{ + // TODO! +}