1 // BBitmapBuffer.h 2 3 #ifndef B_BITMAP_BUFFER_H 4 #define B_BITMAP_BUFFER_H 5 6 #include "RenderingBuffer.h" 7 8 #include <AutoDeleter.h> 9 10 class BBitmap; 11 12 class BBitmapBuffer : public RenderingBuffer { 13 public: 14 BBitmapBuffer(BBitmap* bitmap); 15 virtual ~BBitmapBuffer(); 16 17 virtual status_t InitCheck() const; 18 virtual bool IsGraphicsMemory() const { return false; } 19 20 virtual color_space ColorSpace() const; 21 virtual void* Bits() const; 22 virtual uint32 BytesPerRow() const; 23 virtual uint32 Width() const; 24 virtual uint32 Height() const; 25 26 // BBitmapBuffer 27 const BBitmap* Bitmap() const 28 { return fBitmap.Get(); } 29 private: 30 31 ObjectDeleter<BBitmap> 32 fBitmap; 33 }; 34 35 #endif // B_BITMAP_BUFFER_H 36