home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / NEXTSTEP / UNIX / Web / Utilities / wwwcount-2.3 / combine / defines.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-11-19  |  2.4 KB  |  95 lines

  1. #ifndef DEFINES_H
  2. #define DEFINES_H
  3. /*
  4. ** some important clinet_data
  5. */
  6.  
  7. /*
  8. ** from ImageMagick
  9. */
  10.  
  11. #define DownShift(x) ((int) ((x)+(1L << 15)) >> 16)
  12.  
  13. #ifndef False
  14. #define False  0
  15. #endif
  16.  
  17. #define Max(x,y)  (((x) > (y)) ? (x) : (y))
  18. #define Min(x,y)  (((x) < (y)) ? (x) : (y))
  19. #define MinInfoSize (1 << 18)
  20.  
  21. #ifndef True
  22. #define True  1
  23. #endif
  24.  
  25. #define UpShift(x) ((x) << 16)
  26. #define UpShifted(x) ((int) ((x)*(1L << 16)+0.5))
  27. #define AbsoluteValue(x)  ((x) < 0 ? -(x) : (x))
  28. #define DegreesToRadians(x) ((x)*3.14159265358979323846/180.0)
  29. #define RadiansToDegrees(x) ((x)*180/3.14159265358979323846)
  30.  
  31. #define Intensity(color)  (unsigned int)  \
  32.   ((unsigned int) ((color).red*77+(color).green*150+(color).blue*29) >> 8)
  33.  
  34. #define ColorShift(color)  (((unsigned int) (color)) >> 8)
  35.  
  36. #define XStandardPixel(map,color,dx)  (unsigned long) (map->base_pixel+  \
  37.   ((color.red*map->red_max+(1 << (dx-1)))/((1 << dx)-1))*map->red_mult+  \
  38.   ((color.green*map->green_max+(1 << (dx-1)))/((1 << dx)-1))*map->green_mult+ \
  39.   ((color.blue*map->blue_max+(1 << (dx-1)))/((1 << dx)-1))*map->blue_mult)
  40.  
  41. #define MaxColormapSize        65535
  42. #define MaxImageSize        (4096*4096)
  43. #define MaxRGB                255
  44. #define MaxRunlength        255
  45. #define MaxTextLength        2048
  46.  
  47. #define Transparent         0
  48. #define Opaque              255
  49.  
  50. #define UndefinedId            0
  51.  
  52. #define UndefinedClass        0
  53. #define DirectClass            1
  54. #define PseudoClass            2
  55.  
  56. #define UndefinedColorspace    0
  57. #define RGBColorspace        1
  58. #define GRAYColorspace        2
  59. #define XYZColorspace        3
  60. #define YCbCrColorspace        4
  61. #define YIQColorspace        5
  62. #define YUVColorspace        6
  63. #define OHTAColorspace        7
  64.  
  65. #define UndefinedCompression            0
  66. #define NoCompression                    1
  67. #define RunlengthEncodedCompression        2
  68. #define QEncodedCompression                3
  69. #define LZWCompression                    4
  70. #define PACKBITSCompression                5
  71.  
  72. #define UndefinedInterlace                0
  73. #define NoneInterlace                    1
  74. #define LineInterlace                    2
  75. #define PlaneInterlace                    3
  76.  
  77. #define UndefinedCompositeOp            0
  78. #define OverCompositeOp                    1
  79. #define InCompositeOp                    2
  80. #define OutCompositeOp                    3
  81. #define AtopCompositeOp                    4
  82. #define XorCompositeOp                    5
  83. #define PlusCompositeOp                    6
  84. #define MinusCompositeOp                7
  85. #define AddCompositeOp                    8
  86. #define SubtractCompositeOp                9
  87. #define DifferenceCompositeOp            10
  88. #define ReplaceCompositeOp                11
  89. #define BlackTransparentOp              12
  90.  
  91. #define HighlightModulate   125
  92. #define ShadowModulate      135
  93.  
  94. #endif /*DEFINES_H*/
  95.