1 #if !defined(__ximadefs_h)
\r
6 #if defined(_AFXDLL)||defined(_USRDLL)
\r
7 #define DLL_EXP __declspec(dllexport)
\r
8 #elif defined(_MSC_VER)&&(_MSC_VER<1200)
\r
9 #define DLL_EXP __declspec(dllimport)
\r
15 #if CXIMAGE_SUPPORT_EXCEPTION_HANDLING
\r
17 #define cx_throw(message) throw(message)
\r
18 #define cx_catch catch (const char *message)
\r
20 #define cx_try bool cx_error=false;
\r
21 #define cx_throw(message) {cx_error=true; if(strcmp(message,"")) strncpy(info.szLastError,message,255); goto cx_error_catch;}
\r
22 #define cx_catch cx_error_catch: char message[]=""; if(cx_error)
\r
26 #if CXIMAGE_SUPPORT_JP2 || CXIMAGE_SUPPORT_JPC || CXIMAGE_SUPPORT_PGX || CXIMAGE_SUPPORT_PNM || CXIMAGE_SUPPORT_RAS
\r
27 #define CXIMAGE_SUPPORT_JASPER 1
\r
29 #define CXIMAGE_SUPPORT_JASPER 0
\r
32 #if CXIMAGE_SUPPORT_DSP
\r
33 #undef CXIMAGE_SUPPORT_TRANSFORMATION
\r
34 #define CXIMAGE_SUPPORT_TRANSFORMATION 1
\r
37 #if CXIMAGE_SUPPORT_TRANSFORMATION || CXIMAGE_SUPPORT_TIF || CXIMAGE_SUPPORT_TGA || CXIMAGE_SUPPORT_BMP || CXIMAGE_SUPPORT_WINDOWS
\r
38 #define CXIMAGE_SUPPORT_BASICTRANSFORMATIONS 1
\r
41 #if CXIMAGE_SUPPORT_DSP || CXIMAGE_SUPPORT_TRANSFORMATION
\r
42 #undef CXIMAGE_SUPPORT_INTERPOLATION
\r
43 #define CXIMAGE_SUPPORT_INTERPOLATION 1
\r
46 #if defined (_WIN32_WCE)
\r
47 #undef CXIMAGE_SUPPORT_WMF
\r
48 #define CXIMAGE_SUPPORT_WMF 0
\r
51 #if !defined(WIN32) && !defined(_WIN32_WCE)
\r
52 #undef CXIMAGE_SUPPORT_WINDOWS
\r
53 #define CXIMAGE_SUPPORT_WINDOWS 0
\r
57 #define min(a,b) (((a)<(b))?(a):(b))
\r
60 #define max(a,b) (((a)>(b))?(a):(b))
\r
64 #define PI 3.141592653589793f
\r
68 #if defined(WIN32) || defined(_WIN32_WCE)
\r
69 #include <windows.h>
\r
78 #ifndef _COMPLEX_DEFINED
\r
80 typedef struct tagcomplex {
\r
86 #define _cabs(c) sqrt(c.x*c.x+c.y*c.y)
\r
91 #if !defined(WIN32) && !defined(_WIN32_WCE)
\r
97 typedef unsigned char BYTE;
\r
98 typedef unsigned short WORD;
\r
99 typedef unsigned long DWORD;
\r
100 typedef unsigned int UINT;
\r
102 typedef DWORD COLORREF;
\r
103 typedef unsigned int HANDLE;
\r
104 typedef void* HRGN;
\r
115 #define FALSE false
\r
123 typedef struct tagRECT
\r
131 typedef struct tagPOINT
\r
137 typedef struct tagRGBQUAD {
\r
146 typedef struct tagBITMAPINFOHEADER{
\r
152 DWORD biCompression;
\r
154 long biXPelsPerMeter;
\r
155 long biYPelsPerMeter;
\r
157 DWORD biClrImportant;
\r
158 } BITMAPINFOHEADER;
\r
160 typedef struct tagBITMAPFILEHEADER {
\r
166 } BITMAPFILEHEADER;
\r
168 typedef struct tagBITMAPCOREHEADER {
\r
174 } BITMAPCOREHEADER;
\r
176 typedef struct tagRGBTRIPLE {
\r
187 #define BI_BITFIELDS 3L
\r
189 #define GetRValue(rgb) ((BYTE)(rgb))
\r
190 #define GetGValue(rgb) ((BYTE)(((WORD)(rgb)) >> 8))
\r
191 #define GetBValue(rgb) ((BYTE)((rgb)>>16))
\r
192 #define RGB(r,g,b) ((COLORREF)(((BYTE)(r)|((WORD)((BYTE)(g))<<8))|(((DWORD)(BYTE)(b))<<16)))
\r
194 #ifndef _COMPLEX_DEFINED
\r
196 typedef struct tagcomplex {
\r
202 #define _cabs(c) sqrt(c.x*c.x+c.y*c.y)
\r
206 #endif //__ximadefs
\r