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.

104 lines
3.4 KiB

  1. /**************************************************************************\
  2. *
  3. * Copyright (c) 1999-2000 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * Scan operations
  8. *
  9. * Abstract:
  10. *
  11. * Public scan-operation definitions (in the ScanOperation namespace).
  12. * See Gdiplus\Specs\ScanOperation.doc for an overview.
  13. *
  14. * Created:
  15. *
  16. * 07/16/1999 agodfrey
  17. *
  18. \**************************************************************************/
  19. #ifndef _SCANOPERATION_HPP
  20. #define _SCANOPERATION_HPP
  21. #include "palettemap.hpp"
  22. namespace ScanOperation
  23. {
  24. // OtherParams:
  25. // If a scan operation needs extra information about how to perform
  26. // an operation, it is passed in the OtherParams structure.
  27. struct OtherParams
  28. {
  29. const ColorPalette* Srcpal; // source palette
  30. const ColorPalette* Dstpal; // destination palette
  31. const EpPaletteMap *PaletteMap; // palette translation vector, used when
  32. // halftoning
  33. INT X,Y; // x and y coordinates of the leftmost pixel of the scan.
  34. // Used when halftoning/dithering
  35. BOOL DoingDither; // dithering enabled (for 16bpp)
  36. BYTE *CTBuffer; // ClearType coverage buffer, used for ClearType
  37. // scan types.
  38. ARGB SolidColor; // Solid fill color, used in the OpaqueSolidFill and
  39. // CTSolidFill scan types.
  40. ULONG TextContrast; // Text contrast value for blending, used in CTFill and CTSolidFill types
  41. // blendingScan: Used in the RMW optimization (see ReadRMW and
  42. // WriteRMW). Can be in either ARGB or ARGB64 format.
  43. const void *BlendingScan;
  44. void *TempBuffers[3];
  45. };
  46. /**************************************************************************\
  47. *
  48. * Operation Description:
  49. *
  50. * ScanOpFunc is the signature of every Scan Operation.
  51. *
  52. * Arguments:
  53. *
  54. * dst - The destination scan
  55. * src - The source scan
  56. * count - The length of the scan, in pixels
  57. * otherParams - Additional data.
  58. *
  59. * Return Value:
  60. *
  61. * None
  62. *
  63. * Notes:
  64. *
  65. * The formats of the destination and source depend on the specific
  66. * scan operation.
  67. *
  68. * dst and src must point to non-overlapping buffers. The one exception
  69. * is that they may be equal, but some scan operations don't allow this
  70. * (most notably, those which deal with different-sized source and
  71. * destination formats.)
  72. *
  73. * If you know which operations you're going to be invoking, you can
  74. * omit to set fields in otherParams, trusting that they won't be
  75. * used. This can be error-prone, which is why we try to limit
  76. * the code which uses scan operations directly.
  77. * As an example, if you know you're not going to deal with palettized
  78. * formats, you don't need to set up Srcpal, Dstpal or PaletteMap.
  79. *
  80. \**************************************************************************/
  81. // The common scan operation function signature
  82. typedef VOID (FASTCALL *ScanOpFunc)(
  83. VOID *dst,
  84. const VOID *src,
  85. INT count,
  86. const OtherParams *otherParams
  87. );
  88. };
  89. #endif