Home | History | Annotate | Download | only in include
      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 
     17 #ifndef _GDIPLUSCACHEDBITMAP_H
     18 #define _GDIPLUSCACHEDBITMAP_H
     19 
     20 /**************************************************************************
     21 *
     22 * Class Name:
     23 *
     24 *   CachedBitmap
     25 *
     26 * Abstract:
     27 *
     28 *   An object to store a bitmap prepared for rendering on a particular
     29 *   Graphics object. The memory storage for the CachedBitmap is opaque
     30 *   to the other Engine code, so the only operations supported are
     31 *   initializing the data (with a bitmap) and using the graphics to
     32 *   draw it on the screen with an integer offset.
     33 *
     34 *   Look for the class definition in GdiplusHeaders.h
     35 *
     36 * Created:
     37 *
     38 *   04/23/2000 asecchia
     39 *      Created it.
     40 *
     41 **************************************************************************/
     42 inline
     43 CachedBitmap::CachedBitmap(
     44     IN Bitmap *bitmap,
     45     IN Graphics *graphics)
     46 {
     47     nativeCachedBitmap = NULL;
     48 
     49     lastResult = DllExports::GdipCreateCachedBitmap(
     50         (GpBitmap *)bitmap->nativeImage,
     51         graphics->nativeGraphics,
     52         &nativeCachedBitmap
     53     );
     54 }
     55 
     56 inline
     57 CachedBitmap::~CachedBitmap()
     58 {
     59     DllExports::GdipDeleteCachedBitmap(nativeCachedBitmap);
     60 }
     61 
     62 inline Status
     63 CachedBitmap::GetLastStatus() const
     64 {
     65     Status lastStatus = lastResult;
     66     lastResult = Ok;
     67     return (lastStatus);
     68 }
     69 
     70 #endif
     71 
     72