Main Page   File List   Globals  

tests/test.c

00001 /***************************************************************************
00002                        test.c  -  test program for libFB library
00003                              -------------------
00004     begin                : Mon Nov 20 2000
00005     copyright            : (C) 2000 by Daniele Venzano
00006     email                : webvenza@libero.it
00007  ***************************************************************************/
00008 
00009 /***************************************************************************
00010  *                                                                         *
00011  *   This program is free software; you can redistribute it and/or modify  *
00012  *   it under the terms of the GNU General Public License as published by  *
00013  *   the Free Software Foundation; version 2 of the License.               *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #include "FBlib.h"
00017 #include <stdio.h>
00018 
00019 int main()
00020 {
00021         FB_pixel col,col1,col2;
00022         int bpp;
00023 
00024         FB_initlib("/dev/fb0");
00025 
00026         col = FB_makecol(0,0,255,0);
00027 
00028         col1 = FB_makecol(0,255,0,0);
00029         
00030         col2 = FB_makecol(255,0,0,0);
00031         bpp = FB_getbpp();
00032         FB_clear_screen(FB_makecol(0,0,0,0));
00033         FB_line(700,20,10,500,col);
00034         FB_hline(10,700,20,col1);
00035         FB_vline(10,20,500,col2);
00036         
00037         getchar();
00038         FB_exit();
00039         printf("Bpp used was: %d\n", bpp);
00040         return 0;
00041 }

Generated on Sat Jul 5 09:04:51 2003 for LibFB by doxygen1.2.18