ac20d0f57019b3c0c9a4232601bc3e171446c4a8
[tpg/acess2.git] / Usermode / Applications / axwin4_src / Server / include / CSurface.hpp
1 /*
2  */
3 #ifndef _CSURFACE_H_
4 #define _CSURFACE_H_
5
6 #include <cstdint>
7 #include "CRect.hpp"
8
9 namespace AxWin {
10
11 class CSurface
12 {
13 public:
14         CSurface(int x, int y, unsigned int w, unsigned int h);
15         ~CSurface();
16
17         uint64_t GetSHMHandle();
18         
19         void Resize(unsigned int new_w, unsigned int new_h);
20         
21         void DrawScanline(unsigned int row, unsigned int x_ofs, unsigned int w, const void* data);
22         void BlendScanline(unsigned int row, unsigned int x_ofs, unsigned int w, const void* data);
23         void FillScanline(unsigned int row, unsigned int x, unsigned int w, uint32_t colour);
24         const uint32_t* GetScanline(unsigned int row, unsigned int x_ofs) const;
25         
26         CRect   m_rect;
27         uint32_t*       m_data;
28 private:
29         int     m_fd;
30 };
31
32 };      // namespace AxWin
33
34 #endif
35

UCC git Repository :: git.ucc.asn.au