
221220000 张三 Linux zzy 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux 22:07:29 up 7 days, 22:07, 1 user, load average: 0.41, 0.34, 0.28
20 lines
360 B
C
20 lines
360 B
C
#include <stdio.h>
|
|
#include <assert.h>
|
|
#include <stdlib.h>
|
|
#include <NDL.h>
|
|
#include <BMP.h>
|
|
|
|
int main() {
|
|
NDL_Init(0);
|
|
int w, h;
|
|
void *bmp = BMP_Load("/share/pictures/test.bmp", &w, &h);
|
|
assert(bmp);
|
|
NDL_OpenCanvas(&w, &h);
|
|
NDL_DrawRect(bmp, 0, 0, w, h);
|
|
free(bmp);
|
|
NDL_Quit();
|
|
printf("Test ends! Spinning...\n");
|
|
while (1);
|
|
return 0;
|
|
}
|