Navit SVN

/work/compile/navit/src/navit/graphics/win32/xpm2bmp.h

00001 #ifndef Xpm2BMP_H_INCLUDED
00002 #define Xpm2BMP_H_INCLUDED
00003 
00004 #include <windows.h>
00005 #include "wingdi.h"
00006 
00007 typedef struct XPMCOLORENTRY_TAG
00008 {
00009         char* color_str;
00010         unsigned long r;
00011         unsigned long g;
00012         unsigned long b;
00013 } XPMCOLORENTRY, *PXPMCOLORENTRY;
00014 
00015 typedef struct XPM2BMP_TAG
00016 {
00017         unsigned short size_x;
00018         unsigned short size_y;
00019         unsigned short colors;
00020         unsigned short pixels;
00021         unsigned short chars_per_pixel;
00022         unsigned short hotspot_x;
00023         unsigned short hotspot_y;
00024 
00025         int color_entires_size;
00026         PXPMCOLORENTRY color_entires;
00027 
00028         unsigned char *dib;
00029         unsigned char *wimage_data;
00030         BITMAPINFOHEADER *bmih;
00031 
00032         unsigned char *dib_trans;
00033         unsigned char *wimage_data_trans;
00034         BITMAPINFOHEADER *bmih_trans;
00035 
00036 } XPM2BMP, *PXPM2BMP;
00037 
00038 
00039 PXPM2BMP Xpm2bmp_new(void);
00040 int Xpm2bmp_load( PXPM2BMP pXpm2bmp, const char* filename );
00041 int Xpm2bmp_paint( PXPM2BMP pXpm2bmp, HDC hdc, int x1,int y1 );
00042 
00043 
00044 #endif // Xpm2BMP_H_INCLUDED