Main Page | Alphabetical List | Compound List | File List | Compound Members | File Members

gebmutil.h

Go to the documentation of this file.
00001 #ifndef GEBMUTIL_H
00002 #define GEBMUTIL_H
00003 
00004 #include "genesis.h"
00005 
00006 #ifndef _INC_WINDOWS
00007 #ifdef STRICT
00008 typedef struct HWND__ * HWND;
00009 typedef struct HBITMAP__ * HBITMAP;
00010 #else // STRICT
00011 typedef void * HWND;
00012 typedef void * HBITMAP;
00013 #endif // STRICT
00014 #endif // _INC_WINDOWS
00015 
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 
00022 /*** Windows HBITMAP conversions : ****/
00023 
00024 HBITMAP geBitmapUtil_CreateHBITMAP(geBitmap *Bitmap,HWND window,int mip);
00025         // use DeleteObject when done
00026 
00027 geBitmap * geBitmapUtil_CreateFromHBITMAP(HWND window,HBITMAP hbm);
00028 
00029 /*** Drawing primitives *****/
00030 
00031 geBoolean geBitmapUtil_SetColor(geBitmap *Bmp,int R,int G,int B,int A);
00032         // sets all of the bitmap to one color
00033         // on palettized, use R=G=B=A= 0 to set all palette indeces to zero
00034 
00035 geBoolean geBitmapUtil_SmoothBits(geBitmap_Info *pInfo,void *FmBits,void *ToBits,int radius, geBoolean wrap);
00036         // a convolution filter for linear smoothing
00037         // assembly & fast
00038         // Fm == To is ok
00039         // (btw wrap is slow & not in assembly yet)
00040 
00041 geBoolean geBitmapUtil_SetAlphaFromBrightness(geBitmap *Bmp);
00042 
00043 /*** Misc Utils ***/
00044 
00045 geBitmap * geBitmapUtil_CreateFromFileName(const geVFile * BaseFS,const char * BmName);
00046 geBitmap * geBitmapUtil_CreateFromFileAndAlphaNames(const geVFile * BaseFS,const char * BmName,
00047                                                                                                                                         const char *AlphaName);
00048 
00049 geBoolean geBitmapUtil_SetPaletteFromString(geBitmap * Bitmap,char ** pParams);
00050                                 // moves pParams past the used palette entries
00051 
00052 geBoolean geBitmapUtil_CompareBitmaps(geBitmap *bm1,geBitmap *bm2,char * IntoStr,double * pMSE);
00053                                 // compares YUV's
00054 
00055 double geBitmapUtil_MSE2PSNR(double mse);
00056 double geBitmapUtil_PSNR2MSE(double psnr);
00057 
00058 /******
00059 
00060 todo :
00061 
00062         WriteToBMP
00063 
00064 ********/
00065 
00066 #ifdef __cplusplus
00067 }
00068 #endif
00069 
00070 
00071 #endif
00072 
00073 

Generated on Tue Sep 30 12:35:48 2003 for GTestAndEngine by doxygen 1.3.2