GdiPlusCachedBitmap.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. //Download by http://www.NewXing.com
  2. /**************************************************************************
  3. *
  4. * Copyright (c) 2000 Microsoft Corporation
  5. *
  6. * Module Name:
  7. *
  8. * CachedBitmap class definition
  9. *
  10. * Abstract:
  11. *
  12. * GDI+ CachedBitmap is a representation of an accelerated drawing
  13. * that has restrictions on what operations are allowed in order
  14. * to accelerate the drawing to the destination.
  15. *
  16. * Look for class definition in GdiplusHeaders.h
  17. *
  18. **************************************************************************/
  19. #ifndef _GDIPLUSCACHEDBITMAP_H
  20. #define _GDIPLUSCACHEDBITMAP_H
  21. inline
  22. CachedBitmap::CachedBitmap(
  23. IN Bitmap *bitmap,
  24. IN Graphics *graphics)
  25. {
  26. nativeCachedBitmap = NULL;
  27. lastResult = DllExports::GdipCreateCachedBitmap(
  28. (GpBitmap *)bitmap->nativeImage,
  29. graphics->nativeGraphics,
  30. &nativeCachedBitmap
  31. );
  32. }
  33. inline
  34. CachedBitmap::~CachedBitmap()
  35. {
  36. DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap);
  37. }
  38. inline Status
  39. CachedBitmap::GetLastStatus() const
  40. {
  41. Status lastStatus = lastResult;
  42. lastResult = Ok;
  43. return (lastStatus);
  44. }
  45. #endif