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.

77 lines
1.8 KiB

  1. /**************************************************************************
  2. *
  3. * Copyright (c) 2000 Microsoft Corporation
  4. *
  5. * Module Name:
  6. *
  7. * CachedBitmap class definition
  8. *
  9. * Abstract:
  10. *
  11. * CachedBitmap is a representation of an accelerated drawing
  12. * that has restrictions on what operations are allowed in order
  13. * to accelerate the drawing to the destination.
  14. *
  15. *
  16. Created:
  17. *
  18. * 04/23/2000 asecchia
  19. * Created it.
  20. *
  21. **************************************************************************/
  22. #ifndef _GDIPLUSCACHEDBITMAP_H
  23. #define _GDIPLUSCACHEDBITMAP_H
  24. /**************************************************************************
  25. *
  26. * Class Name:
  27. *
  28. * CachedBitmap
  29. *
  30. * Abstract:
  31. *
  32. * An object to store a bitmap prepared for rendering on a particular
  33. * Graphics object. The memory storage for the CachedBitmap is opaque
  34. * to the other Engine code, so the only operations supported are
  35. * initializing the data (with a bitmap) and using the graphics to
  36. * draw it on the screen with an integer offset.
  37. *
  38. * Look for the class definition in GdiplusHeaders.h
  39. *
  40. * Created:
  41. *
  42. * 04/23/2000 asecchia
  43. * Created it.
  44. *
  45. **************************************************************************/
  46. inline
  47. CachedBitmap::CachedBitmap(
  48. IN Bitmap *bitmap,
  49. IN Graphics *graphics)
  50. {
  51. nativeCachedBitmap = NULL;
  52. lastResult = DllExports::GdipCreateCachedBitmap(
  53. (GpBitmap *)bitmap->nativeImage,
  54. graphics->nativeGraphics,
  55. &nativeCachedBitmap
  56. );
  57. }
  58. inline
  59. CachedBitmap::~CachedBitmap()
  60. {
  61. DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap);
  62. }
  63. inline Status
  64. CachedBitmap::GetLastStatus() const
  65. {
  66. Status lastStatus = lastResult;
  67. lastResult = Ok;
  68. return (lastStatus);
  69. }
  70. #endif