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.

85 lines
2.1 KiB

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1999-2000 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * AARasterizer.hpp
  8. *
  9. * Abstract:
  10. *
  11. * GpRasterizer class definition (and supporting classes)
  12. *
  13. * Created:
  14. *
  15. * 04/12/99 AMatos
  16. *
  17. \**************************************************************************/
  18. #ifndef _AARASTERIZER_HPP
  19. #define _AARASTERIZER_HPP
  20. // It's possible to have higher 'X' resolution antialiasing than 'Y', with
  21. // only a slight decrease in performance:
  22. #define AA_X_WIDTH 8
  23. #define AA_X_MASK 7
  24. #define AA_X_HALF 4
  25. #define AA_X_SHIFT 3
  26. #define AA_Y_HEIGHT 4
  27. #define AA_Y_MASK 3
  28. #define AA_Y_HALF 2
  29. #define AA_Y_SHIFT 2
  30. // Calculate the new color channel value according to the coverage:
  31. //
  32. // round((c * multiplier) / 2^(shift))
  33. #define MULTIPLY_COVERAGE(c, multiplier, shift) \
  34. static_cast<UCHAR>((static_cast<UINT>(c) * (multiplier) \
  35. + (1 << ((shift) - 1))) >> (shift))
  36. // SWAP macro:
  37. #define SWAP(temp, a, b) { temp = a; a = b; b = temp; }
  38. enum PathEnumerateTermination {
  39. PathEnumerateContinue, // more to come in this subpath
  40. PathEnumerateEndSubpath, // end this subpath.
  41. PathEnumerateCloseSubpath // end this subpath with a close figure.
  42. };
  43. typedef BOOL (*FIXEDPOINTPATHENUMERATEFUNCTION)(
  44. VOID *, POINT *, INT, PathEnumerateTermination
  45. );
  46. enum PathEnumerateType {
  47. PathEnumerateTypeStroke,
  48. PathEnumerateTypeFill,
  49. PathEnumerateTypeFlatten
  50. };
  51. BOOL
  52. FixedPointPathEnumerate(
  53. const DpPath *path,
  54. const GpMatrix *matrix,
  55. const RECT *clipRect,
  56. PathEnumerateType enumType,
  57. FIXEDPOINTPATHENUMERATEFUNCTION enumerateFunction,
  58. VOID *enumerateContext
  59. );
  60. GpStatus
  61. RasterizePath(
  62. const DpPath *path,
  63. GpMatrix *worldTransform,
  64. GpFillMode fillMode,
  65. BOOL antiAlias,
  66. BOOL nominalWideLine,
  67. DpOutputSpan *output,
  68. DpClipRegion *clipper,
  69. const GpRect *drawBounds
  70. );
  71. #endif // _AARASTERIZER_HPP