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.

107 lines
3.2 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: fill.hxx
  3. *
  4. * (Brief description)
  5. *
  6. * Created: 06-Oct-1993 09:11:17
  7. * Author: Eric Kutter [erick]
  8. *
  9. * Copyright (c) 1993-1999 Microsoft Corporation
  10. *
  11. * (General description of its use)
  12. *
  13. * Dependencies:
  14. *
  15. * (#defines)
  16. * (#includes)
  17. *
  18. \**************************************************************************/
  19. /**************************************************************************\
  20. *
  21. * Slow fill stuff
  22. *
  23. \**************************************************************************/
  24. class EDGE;
  25. typedef EDGE *PEDGE;
  26. class EDGE
  27. {
  28. public:
  29. PEDGE pNext;
  30. LONG lScansLeft;
  31. LONG X;
  32. LONG Y;
  33. LONG lErrorTerm;
  34. LONG lErrorAdjustUp;
  35. LONG lErrorAdjustDown;
  36. LONG lXWhole;
  37. LONG lXDirection;
  38. LONG lWindingDirection;
  39. };
  40. #define MAX_POINTS 20
  41. /**************************************************************************\
  42. *
  43. * FastFill stuff
  44. *
  45. \**************************************************************************/
  46. // The x86 C compiler insists on making a divide and modulus operation
  47. // into two DIVs, when it can in fact be done in one. So we use this macro.
  48. //
  49. // Note: QUOTIENT_REMAINDER implicitly takes unsigned arguments
  50. //#if defined(_X86_) || defined(i386)
  51. #if 0
  52. #define QUOTIENT_REMAINDER(ulNumerator, ulDenominator, ulQuotient, ulRemainder) \
  53. __asm mov eax, ulNumerator \
  54. __asm sub edx, edx \
  55. __asm div ulDenominator \
  56. __asm mov ulQuotient, eax \
  57. __asm mov ulRemainder, edx
  58. #else
  59. #define QUOTIENT_REMAINDER(ulNumerator, ulDenominator, ulQuotient, ulRemainder) \
  60. ulQuotient = (ULONG) ulNumerator / (ULONG) ulDenominator; \
  61. ulRemainder = (ULONG) ulNumerator % (ULONG) ulDenominator;
  62. #endif
  63. typedef struct _EDGEDATA {
  64. LONG x; // Current x position
  65. LONG dx; // # pixels to advance x on each scan
  66. LONG lError; // Current DDA error
  67. LONG lErrorUp; // DDA error increment on each scan
  68. LONG lErrorDown; // DDA error adjustment
  69. POINTFIX* pptfx; // Points to start of current edge
  70. LONG dptfx; // Delta (in bytes) from pptfx to next point
  71. LONG cy; // Number of scans to go for this edge
  72. } EDGEDATA; /* ed, ped */
  73. /**************************************************************************\
  74. *
  75. *
  76. \**************************************************************************/
  77. VOID vMoveNewEdges(EDGE *pGETHead, EDGE *pAETHead, LONG lyCurrent);
  78. VOID vXSortAETEdges(EDGE *pAETHead);
  79. VOID vAdvanceAETEdges(EDGE *pAETHead);
  80. VOID vConstructGET(EPATHOBJ& po, EDGE *pGETHead, EDGE *pFreeEdges,RECTL *pBound);
  81. PEDGE AddEdgeToGET(EDGE *pGETHead, EDGE *pFreeEdge,
  82. POINTFIX *ppfxEdgeStart, POINTFIX *ppfxEdgeEnd);
  83. LONG EngFastFill(
  84. SURFOBJ *pso,
  85. PATHOBJ *ppo,
  86. PRECTL prcl,
  87. BRUSHOBJ *pdbrush,
  88. POINTL *pptlBrush,
  89. MIX mix,
  90. FLONG flOptions);