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.

97 lines
2.7 KiB

  1. /*++
  2. Copyright (c) 2000 Microsoft Corporation
  3. Module Name:
  4. cmnhdr.h
  5. Abstract:
  6. Vector module common header file.
  7. Environment:
  8. Windows Whistler
  9. Revision History:
  10. 03/23/00
  11. Created it.
  12. --*/
  13. #ifndef _CMNHDR_H_
  14. #define _CMNHDR_H_
  15. #ifdef __cplusplus
  16. //
  17. // Color ID
  18. //
  19. #define NOT_SOLID_COLOR 0xFFFFFFFF
  20. #define RGB_WHITE 0x00FFFFFF
  21. #define RGB_BLACK 0x00000000
  22. //
  23. // Hatch Pattern ID
  24. //
  25. #define HS_HORIZONTAL 0 /* ----- */
  26. #define HS_VERTICAL 1 /* ||||| */
  27. #define HS_FDIAGONAL 2 /* \\\\\ */
  28. #define HS_BDIAGONAL 3 /* ///// */
  29. #define HS_CROSS 4 /* +++++ */
  30. #define HS_DIAGCROSS 5 /* xxxxx */
  31. //
  32. // PCL6 real32 values
  33. //
  34. #define real32_IEEE_1_0F ((FLOATL)0x3F800000)
  35. #define real32_IEEE_10_0F ((FLOATL)0x41200000)
  36. //
  37. // floating point numbers
  38. //
  39. #if defined(_X86_) && !defined(USERMODE_DRIVER)
  40. #define FLOATL_IEEE_0_005MF ((FLOATL)0xbba3d70a)
  41. #define FLOATL_IEEE_0_005F ((FLOATL)0x3ba3d70a)
  42. #define FLOATL_IEEE_0_0F ((FLOATL)0x00000000)
  43. #define FLOATL_IEEE_1_0F ((FLOATL)0x3F800000)
  44. #else
  45. #define FLOATL_IEEE_0_005MF -0.005f
  46. #define FLOATL_IEEE_0_005F 0.005f
  47. #define FLOATL_IEEE_0_0F 0.0f
  48. #define FLOATL_IEEE_1_0F 1.0f
  49. #endif
  50. //
  51. // GDI FIX
  52. //
  53. #define FIX_SHIFT 4
  54. #define FIX_ONE (1 << FIX_SHIFT)
  55. #define FIX2sint16(x) ((WORD)((x) >> FIX_SHIFT))
  56. //
  57. // Misc macros
  58. //
  59. #define SWAPW(a) (USHORT)(((BYTE)((a) >> 8)) | ((BYTE)(a) << 8))
  60. #define SWAPDW(a) (ULONG) ((((((a) >> 24) & 0x000000ff) | \
  61. (((((a) >> 8) & 0x0000ff00) | \
  62. ((((a) << 8) & 0x00ff0000) | \
  63. (((a) << 24) & 0xff000000)))))))
  64. #define SIGNATURE( sig ) \
  65. public: \
  66. class TSignature { \
  67. public: \
  68. DWORD _Signature; \
  69. TSignature() : _Signature( SWAPDW( sig )) { } \
  70. }; \
  71. TSignature _Signature; \
  72. \
  73. BOOL bSigCheck() const \
  74. { return _Signature._Signature == SWAPDW( sig ); } \
  75. private:
  76. #endif // __cplusplus
  77. #endif // _CMNHDR_H_