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.

62 lines
1.8 KiB

  1. /******************************Module*Header*******************************\
  2. * Module Name: paintddi.cxx
  3. *
  4. * Paint callbacks
  5. *
  6. * Created: 05-Mar-1992 18:30:39
  7. * Author: Donald Sidoroff [donalds]
  8. *
  9. * Copyright (c) 1992-1999 Microsoft Corporation
  10. \**************************************************************************/
  11. #include "precomp.hxx"
  12. /******************************Public*Routine******************************\
  13. * EngPaint
  14. *
  15. * Paint the clipping region with the specified brush
  16. *
  17. * History:
  18. * 05-Mar-1992 -by- Donald Sidoroff [donalds]
  19. * add accelerators for common mix modes.
  20. *
  21. * Sat 07-Sep-1991 -by- Patrick Haluptzok [patrickh]
  22. * add translate of mix to rop
  23. *
  24. * 01-Apr-1991 -by- Patrick Haluptzok patrickh
  25. * Wrote it.
  26. \**************************************************************************/
  27. BOOL EngPaint(
  28. SURFOBJ *pso,
  29. CLIPOBJ *pco,
  30. BRUSHOBJ *pdbrush,
  31. POINTL *pptlBrush,
  32. MIX mix)
  33. {
  34. GDIFunctionID(EngPaint);
  35. PSURFACE pSurf = SURFOBJ_TO_SURFACE(pso);
  36. ASSERTGDI(pso != (SURFOBJ *) NULL, "NULL SURFOBJ\n");
  37. ASSERTGDI(pco != (CLIPOBJ *) NULL, "NULL CLIPOBJ\n");
  38. ASSERTGDI(pco->iMode == TC_RECTANGLES,"iMode not rects\n");
  39. ASSERTGDI(mix & 0xff00, "Background mix uninitialized");
  40. ROP4 rop4 = gaMix[(mix >> 8) & 0x0F];
  41. rop4 = rop4 << 8;
  42. rop4 = rop4 | ((ULONG) gaMix[mix & 0x0F]);
  43. return(pSurf->pfnBitBlt())(
  44. (SURFOBJ *) pso,
  45. (SURFOBJ *) NULL,
  46. (SURFOBJ *) NULL,
  47. pco,
  48. NULL,
  49. (RECTL *) &(((ECLIPOBJ *) pco)->erclExclude()),
  50. (POINTL *) NULL,
  51. (POINTL *) NULL,
  52. pdbrush,
  53. pptlBrush,
  54. rop4);
  55. }