Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

101 lines
6.3 KiB

  1. //***************************************************************************************************
  2. // N403DIZ.H
  3. //
  4. // C Header (Functions of dither and color matching (For N4-612 printer))
  5. //---------------------------------------------------------------------------------------------------
  6. // copyright(C) 1997-1999 CASIO COMPUTER CO.,LTD. / CASIO ELECTRONICS MANUFACTURING CO.,LTD.
  7. //***************************************************************************************************
  8. //***************************************************************************************************
  9. // Data define
  10. //***************************************************************************************************
  11. //---------------------------------------------------------------------------------------------------
  12. // Color/Monochrome
  13. //---------------------------------------------------------------------------------------------------
  14. #define N403_COL 0
  15. #define N403_MON 1
  16. //---------------------------------------------------------------------------------------------------
  17. // Printer mode
  18. //---------------------------------------------------------------------------------------------------
  19. #define N403_MOD_300B1 0
  20. #define N403_MOD_300B2 1
  21. #define N403_MOD_300B4 2
  22. #define N403_MOD_600B1 3
  23. #define N403_MOD_600B2 4
  24. //---------------------------------------------------------------------------------------------------
  25. // Type of dithering
  26. //---------------------------------------------------------------------------------------------------
  27. #define N403_DIZ_SML 0
  28. #define N403_DIZ_MID 1
  29. #define N403_DIZ_RUG 2
  30. //---------------------------------------------------------------------------------------------------
  31. // Dither pattern
  32. //---------------------------------------------------------------------------------------------------
  33. #define N403_ALLDIZNUM 64
  34. #define N403_DIZSPC 4
  35. //---------------------------------------------------------------------------------------------------
  36. // size of each table
  37. //---------------------------------------------------------------------------------------------------
  38. #define N403_DIZSIZ_B1 (32 * 32) // dither table size (2value)
  39. #define N403_DIZSIZ_B2 (16 * 16 * 3) // dither table size (4value)
  40. #define N403_DIZSIZ_B4 ( 8 * 8 * 15) // dither table size (16value)
  41. #define N403_ENTDIZSIZ_B2 (16 * 16 * 3) // entry dither table size (4value)
  42. #define N403_TNRTBLSIZ 256 // toner density table size
  43. #define N403_GLDNUM 32 // LUT table grid
  44. #define N403_GLDSPC 8 // LUT table grid interval
  45. // LUT table size
  46. #define N403_LUTTBLSIZ ((DWORD)N403_GLDNUM * N403_GLDNUM * N403_GLDNUM * sizeof(CMYK))
  47. #define N403_CCHNUM 256 // Number of cache tables
  48. #define N403_CCHRGBSIZ (N403_CCHNUM * sizeof(RGBS)) // Cache table size(RGB)
  49. #define N403_CCHCMYSIZ (N403_CCHNUM * sizeof(CMYK)) // Cache table size(CMYK)
  50. //---------------------------------------------------------------------------------------------------
  51. // Structure for control dithering and color-matching
  52. //---------------------------------------------------------------------------------------------------
  53. typedef struct {
  54. DWORD ColMon; // Color/Monochrome
  55. DWORD PrnMod; // Printermode
  56. struct { // Structure for dither pattern
  57. DWORD Num; // Table current number(0�`2)
  58. LPBYTE Tbl[3][4]; // Data table
  59. } Diz;
  60. struct { // Structure for entry dither pattern
  61. LPBYTE Tbl[4]; // Data table
  62. } EntDiz;
  63. struct { // Structure for toner density table
  64. LPBYTE Tbl; // Data table
  65. } Tnr;
  66. struct { // Structure for LUT table
  67. LPCMYK Tbl; // Data table
  68. LPRGB CchRgb; // Cache table(RGB)
  69. LPCMYK CchCmy; // Cache table(CMYK)
  70. } Lut;
  71. DWORD DizSiz[4]; // dither pattern size
  72. } N403DIZINF, *LPN403DIZINF;
  73. //***************************************************************************************************
  74. // Functions
  75. //***************************************************************************************************
  76. VOID WINAPI N403DizPtnMak(LPN403DIZINF, DWORD, DWORD);
  77. VOID WINAPI N403TnrTblMak(LPN403DIZINF, LONG);
  78. DWORD WINAPI N403Diz002(LPN403DIZINF, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCMYK, LPBYTE, LPBYTE, LPBYTE, LPBYTE);
  79. DWORD WINAPI N403Diz004(LPN403DIZINF, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCMYK, LPBYTE, LPBYTE, LPBYTE, LPBYTE);
  80. DWORD WINAPI N403Diz016(LPN403DIZINF, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCMYK, LPBYTE, LPBYTE, LPBYTE, LPBYTE);
  81. DWORD WINAPI N403DizSml(LPN403DIZINF, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCMYK, LPBYTE, LPBYTE, LPBYTE, LPBYTE);
  82. DWORD WINAPI N403DizPrn(LPN403DIZINF, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, DWORD, LPCMYK, LPBYTE, LPBYTE, LPBYTE, LPBYTE);
  83. VOID WINAPI N403ColMch000(LPN403DIZINF, LPRGB, LPCMYK, DWORD, DWORD);
  84. VOID WINAPI N403ColMch001(LPN403DIZINF, LPRGB, LPCMYK, DWORD, DWORD);
  85. VOID WINAPI N403ColVivPrc(LPN403DIZINF, LPCMYK, DWORD, DWORD);
  86. VOID WINAPI N403ColCnvSld(LPN403DIZINF, LPRGB, LPCMYK, DWORD, DWORD);
  87. VOID WINAPI N403ColCnvL02(LPN403DIZINF, LPRGB, LPCMYK, DWORD);
  88. VOID WINAPI N403ColCnvMon(LPN403DIZINF, LPRGB, LPCMYK, DWORD);
  89. // End of N403DIZ.H
  90.