headers/bsd: Add sys/queue.h.
[haiku.git] / src / servers / app / RenderingBuffer.h
blob766db056a52d871093c14503565135bcf21a444f
1 // RenderingBuffer.h
3 #ifndef RENDERING_BUFFER_H
4 #define RENDERING_BUFFER_H
6 #include <GraphicsDefs.h>
7 #include "IntRect.h"
9 class RenderingBuffer {
10 public:
11 RenderingBuffer() {}
12 virtual ~RenderingBuffer() {}
14 virtual status_t InitCheck() const = 0;
16 virtual color_space ColorSpace() const = 0;
17 virtual void* Bits() const = 0;
18 virtual uint32 BytesPerRow() const = 0;
19 // the *count* of the pixels per line
20 virtual uint32 Width() const = 0;
21 // the *count* of lines
22 virtual uint32 Height() const = 0;
24 inline uint32 BitsLength() const
25 { return Height() * BytesPerRow(); }
27 inline IntRect Bounds() const
28 { return IntRect(0, 0, Width() - 1,
29 Height() - 1); }
32 #endif // RENDERING_BUFFER_H