comparison Framework/Viewport/CairoContext.h @ 339:5a7915b23138 am-2

cont
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 19 Oct 2018 14:44:12 +0200
parents 4cff7b1ed31d
children ef31240a73f6
comparison
equal deleted inserted replaced
338:b3b3fa0e3689 339:5a7915b23138
27 { 27 {
28 // This is a RAII wrapper around the Cairo drawing context 28 // This is a RAII wrapper around the Cairo drawing context
29 class CairoContext : public boost::noncopyable 29 class CairoContext : public boost::noncopyable
30 { 30 {
31 private: 31 private:
32 cairo_t* context_; 32 cairo_t* context_;
33 unsigned int width_;
34 unsigned int height_;
33 35
34 public: 36 public:
35 CairoContext(CairoSurface& surface); 37 CairoContext(CairoSurface& surface);
36 38
37 ~CairoContext(); 39 ~CairoContext();
38 40
39 cairo_t* GetObject() 41 cairo_t* GetObject()
40 { 42 {
41 return context_; 43 return context_;
44 }
45
46 unsigned int GetWidth() const
47 {
48 return width_;
49 }
50
51 unsigned int GetHeight() const
52 {
53 return height_;
42 } 54 }
43 55
44 void SetSourceColor(uint8_t red, 56 void SetSourceColor(uint8_t red,
45 uint8_t green, 57 uint8_t green,
46 uint8_t blue); 58 uint8_t blue);