gramods
SaveView.hh
1 
2 #ifndef GRAMODS_GRAPHICS_SAVEVIEW
3 #define GRAMODS_GRAPHICS_SAVEVIEW
4 
5 // Required before gmCore/OFactory.hh for some compilers
6 #include <gmCore/io_size.hh>
7 
8 #include <gmGraphics/View.hh>
9 
10 BEGIN_NAMESPACE_GMGRAPHICS;
11 
16 class SaveView
17  : public View {
18 
19 public:
20 
21  SaveView();
22 
26  void renderFullPipeline(ViewSettings settings) override;
27 
33  void traverse(Visitor *visitor) override;
34 
55  void setFile(std::filesystem::path file);
56 
64  void setResolution(gmCore::size2 res);
65 
70  void setUseFloat(bool on);
71 
76  bool getUseFloat();
77 
82  void setUseAlpha(bool on);
83 
87  bool getUseAlpha();
88 
96  void setExit(bool on);
97 
103  void addView(std::shared_ptr<View> view);
104 
105  GM_OFI_DECLARE;
106 
107 private:
108 
109  struct Impl;
110  std::unique_ptr<Impl> _impl;
111 
112 };
113 
114 END_NAMESPACE_GMGRAPHICS;
115 
116 #endif
The SaveView is a view that saves the image generated by another view.
Definition: SaveView.hh:17
The base of graphics View implementations.
Definition: View.hh:13
std::array< size_t, 2 > size2
Array of 2 size_t.
Definition: io_size.hh:9
The visitor of a design pattern for automatic traversal.
Definition: Object.hh:75
Definition: SaveView.cpp:35
Package of settings affecting the rendering.
Definition: ViewBase.hh:30