home *** CD-ROM | disk | FTP | other *** search
/ Photo CD Demo 1 / Demo.bin / gle / gle / bmp.h < prev    next >
C/C++ Source or Header  |  1992-11-29  |  2KB  |  56 lines

  1. #define PWIDTH 32   /* puts it on a boundary so far pointers work better */
  2. typedef struct s_run {
  3.     unsigned char *alloc; /* Array, Num of allocated bytes for row */
  4.     unsigned char *used; /* Number currently used */
  5.     int *(*row)[];  /* Pointer, to array of pointers to row count data */
  6. } Run;
  7.  
  8. typedef unsigned char *ucharp;
  9. typedef int *(*typrow)[];
  10. typedef struct bitmap {
  11.     char *(*data)[];
  12.         int compress;
  13.     int nx,ny;
  14.     int x1,y1,sx,sy,lddy,sddy,lendx,lendy,ssx,ssy;
  15.     Run clip;
  16.     int clipping;
  17.     int *lastclip;
  18.     Run paint;
  19.     Run horiz;
  20.     int painty1,painty2;
  21.     long lstyle,lstyle_mask;
  22.         int lstyle_dotlen, lstyle_dotpix;
  23.     int lwidth;
  24.     char ink[16][16];
  25. } Bitmap;
  26.  
  27.  
  28.  
  29. Bitmap *bmp_open(int xsize,int ysize,int depth,int bmp_compression);
  30. int iffree(void *block);
  31. int bmp_close(Bitmap *b);
  32. int bmp_line(Bitmap *b,int x1,int y1,int x2,int y2);
  33. int bmp_pixel(Bitmap *b,int x, int y);
  34. int bmp_paintrange(Bitmap *b,int y, int x1, int x2);
  35. int bmp_invis(Bitmap *b, int x, int y);
  36. int bmp_pmove(Bitmap *b,int x1,int y1);
  37. int bmp_pline(Bitmap *b,int x2,int y2);
  38. int bmp_clipline(Bitmap *b,int *x1, int *y1, int *x2, int *y2);
  39. int doclip(int min, int max, int *v);
  40. int bmp_minmax(Bitmap *b,int y);
  41. int bmp_paintx(Bitmap *b, int x, int y);
  42. int bmp_newpath(Bitmap *b);
  43. int bmp_paintsort(int *p, int np);
  44. int bmp_fill(Bitmap *b);
  45. int bmp_copy(Bitmap *b,char *bitmap,int nx,int ny);
  46. int bmp_clip(Bitmap *b);
  47. int bmp_newclip(Bitmap *b);
  48. int bmp_saveclip(Bitmap *b);
  49. int bmp_restoreclip(Bitmap *b);
  50. int bmp_color(Bitmap *b,int colindex);
  51. int bmp_lwidth(Bitmap *b,int x);
  52. int bmp_lstyle(Bitmap *b,long n,int l);
  53. int bmp_pattern(Bitmap *b,char *pat,int nxbytes,int nybytes,int depth);
  54. char *bmp_row(Bitmap *b,int y);
  55. int bmp_die(char *s);
  56.