fbxmove_mask.c

来自「libfxb是linux下只写操作framebuffer的一个轻量级的库。」· C语言 代码 · 共 39 行

C
39
字号
/* fbxmove_mask.c - Tests the fb_move_object and fb_draw_masked_image functions. * * By Michael Bourgeous * * $Id: fbxmove_mask.c,v 1.2 2001/02/25 20:40:07 lethal Exp $ */#include <libfbx/libfbx.h>#include <math.h>#include <config.h>int main(){	float speed = 0.125;	float radians = 0.0;	float x = 160.0;	float y = 120.0;	fb_surface *object;	fb_init();	fb_handle_signals();	object = fb_load_ppm(IMAGEDIR "/smiley_mask.ppm");		for(radians = 0.0; radians < (PI * 64.0); radians += (PI / 128.0))	{		fb_move_object(speed, radians, &x, &y);		fb_draw_masked_image(object, fb_screen, (int)x, (int)y, object->width, object->height);		speed = (sin(0.125 * radians) + 1.25);	}	fb_cleanup();	return 0;}

⌨️ 快捷键说明

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