MUAN
image.h
Go to the documentation of this file.
00001 
00005 /*
00006  * Copyright (C) 2006  Lab. Visgraf/IMPA and AnimaMundi
00007  * 
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License
00010  * as published by the Free Software Foundation; either version 2
00011  * of the License, or (at your option) any later version.
00012  * 
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00021  * 
00022 */
00023 #ifndef IMAGE_H
00024 #define IMAGE_H
00025 
00026 #include "laux.h"
00027 
00028 #define IMG_DV_W 720
00029 #define IMG_DV_H 480
00030 
00031 #define RED(c) (c.r)
00032 #define GRN(c) (c.g)
00033 #define BLU(c) (c.b)
00034 
00035 
00036 typedef struct Bcolor {
00037   Byte r, g, b;
00038 } Bcolor;
00039 
00040 typedef struct Image {
00041   int w, h;
00042   Byte *c;
00043 } Image;
00044 
00045 Image *img_create(int w, int h);
00046 void img_free(Image *i);
00047 
00048 void  img_clear(Image *i, Bcolor c);
00049 
00050 void  img_putc(Image *i, int u, int v, Bcolor c);
00051 Bcolor img_getc(Image *i, int u, int v);
00052 
00053 Bcolor c_make(Byte x, Byte y, Byte z);
00054 
00055 #endif