1 /************************************************************************/
2 /*									*/
3 /*  Functions relating to rendering raster images.			*/
4 /*									*/
5 /************************************************************************/
6 
7 #   ifndef	BM_RENDER_H
8 #   define	BM_RENDER_H
9 
10 #   include	"bitmap.h"
11 #   include	"bmcolor.h"
12 
13 /************************************************************************/
14 /*									*/
15 /*  Routine declarations.						*/
16 /*									*/
17 /************************************************************************/
18 
19 extern int bmFillImage(		ColorAllocator *		ca,
20 				int				bitmapUnit,
21 				int				swapBitmapBytes,
22 				int				swapBitmapBits,
23 				int				dither,
24 				unsigned char *			bufferOut,
25 				const BitmapDescription *	bdOut,
26 				const RasterImage *		riIn,
27 				const DocumentRectangle *	drSel );
28 
29 extern int bmTextureMap(	ColorAllocator *		ca,
30 				int				swapBitmapUnit,
31 				int				swapBitmapBytes,
32 				int				swapBitmapBits,
33 				int				dither,
34 				unsigned char *			bufferOut,
35 				const unsigned char *		bufferIn,
36 				const BitmapDescription *	bdOut,
37 				const BitmapDescription *	bdIn,
38 				double				E_x,
39 				double				E_y,
40 				double				E_z,
41 				double				P_x,
42 				double				P_y,
43 				double				P_z,
44 				double				N_x,
45 				double				N_y,
46 				double				N_z,
47 				double				M_x,
48 				double				M_y,
49 				double				M_z );
50 
51 extern int bmTextureMapInverse(	ColorAllocator *		ca,
52 				int				swapBitmapUnit,
53 				int				swapBitmapBytes,
54 				int				swapBitmapBits,
55 				int				dither,
56 				unsigned char *			bufferOut,
57 				const unsigned char *		bufferIn,
58 				const BitmapDescription *	bdOut,
59 				const BitmapDescription *	bdIn,
60 				double				E_x,
61 				double				E_y,
62 				double				E_z,
63 				double				P_x,
64 				double				P_y,
65 				double				P_z,
66 				double				N_x,
67 				double				N_y,
68 				double				N_z,
69 				double				M_x,
70 				double				M_y,
71 				double				M_z );
72 
73 extern int bmSetColorAllocatorForImage(	ColorAllocator *		ca,
74 					const BitmapDescription *	bd );
75 
76 extern int bmSetColorAllocatorForPaletteImage(
77 					ColorAllocator *		ca,
78 					const BitmapDescription *	bd );
79 
80 extern int bmSetColorAllocatorForBWImage(
81 					ColorAllocator *		ca,
82 					const BitmapDescription *	bd );
83 
84 extern int bmSetColorAllocatorForWBImage(
85 					ColorAllocator *		ca,
86 					const BitmapDescription *	bd );
87 
88 #   endif
89