⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fbxmask.c

📁 libfxb是linux下只写操作framebuffer的一个轻量级的库。
💻 C
字号:
#include <libfbx/libfbx.h>#include <stdlib.h>#include <time.h>#include <config.h>int main(){	int i;	int r, g, b;	fb_surface *image;	fb_surface *image2;	fb_init();		image = fb_load_ppm(IMAGEDIR "/smiley_mask.ppm");	image2 = fb_load_ppm(IMAGEDIR "/smiley.ppm");	fb_cls();	for(i = 0; i < 150; i++)	{		fb_line(rand() % 100 + fb_screen->width / 2 - 50, rand() % 100 + fb_screen->height / 2 - 50,			rand() % 100 + fb_screen->width / 2 - 50, rand() % 100 + fb_screen->height / 2 - 50,			rand() % 256, rand() % 256, rand() % 256,			fb_screen);	}	fb_getpixel(0, 0, &r, &g, &b, image);		fb_printf(0, 0, "Masked image, bg = (%x, %x, %x)", r, g, b);	fb_draw_masked_image(image, fb_screen, 			     (fb_screen->width - image->width) / 2,			     (fb_screen->height - image->height) / 2,			     image->width, image->height);	sleep(4);	fb_getpixel(0, 0, &r, &g, &b, image2);	fb_printf(0, 0, "Unmasked image, bg = (%x, %x, %x)", r, g, b);	fb_draw_image(image2, fb_screen,		      (fb_screen->width - image2->width) / 2,		      (fb_screen->height - image2->height) / 2);	sleep(4);	fb_cleanup();	return 0;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -