Horizon
export_3d_image.hpp
1 #pragma once
2 #include <string>
3 #include <vector>
4 #include "canvas3d/canvas3d_base.hpp"
5 #include <cairomm/cairomm.h>
6 
7 namespace horizon {
8 
9 class Image3DExporter : public Canvas3DBase {
10 public:
11  Image3DExporter(const class Board &brd, class IPool &pool, unsigned int width, unsigned int height);
12 
13  void load_3d_models();
14  Cairo::RefPtr<Cairo::Surface> render_to_surface();
15  virtual ~Image3DExporter();
16  bool render_background = false;
17 
18 private:
19  class IPool &pool;
20  void *ctx = nullptr; // to get around including osmesa here
21  std::vector<unsigned char> buffer;
22  void check_ctx();
23 };
24 
25 } // namespace horizon
Definition: board.hpp:42
Definition: canvas3d_base.hpp:15
Definition: ipool.hpp:12
Definition: export_3d_image.hpp:9