🛰️航天仿真算法库 SpaceAST 0.0.1
载入中...
搜索中...
未找到
AggBackend.hpp
浏览该文件的文档.
1
21
22#pragma once
23
24#include "AstGlobal.h"
25
26#if defined(AST_WITH_AGG) && defined(AST_WITH_MATPLOT)
27#include <matplot/backend/backend_interface.h>
28
29#include <memory>
30#include <string>
31
32AST_NAMESPACE_BEGIN
33
43class AST_PLOT_API AggBackend : public matplot::backend::backend_interface {
44public:
45 AggBackend();
46 virtual ~AggBackend() override;
47
48 // ---- backend_interface 实现 ----
49
50 bool consumes_gnuplot_commands() override; // false
51 bool is_interactive() override; // false
52
53 const std::string& output() override;
54 const std::string& output_format() override;
55 bool output(const std::string& filename) override;
56 bool output(const std::string& filename,
57 const std::string& file_format) override;
58
59 unsigned int width() override;
60 unsigned int height() override;
61 void width(unsigned int new_width) override;
62 void height(unsigned int new_height) override;
63
64 unsigned int position_x() override;
65 unsigned int position_y() override;
66 void position_x(unsigned int new_position_x) override;
67 void position_y(unsigned int new_position_y) override;
68
69 void window_title(const std::string& title) override;
70 std::string window_title() override;
71
72 bool new_frame() override;
73 bool render_data() override;
74 void show(matplot::figure_type* f) override;
75 bool should_close() override;
76 bool supports_fonts() override;
77
78 void draw(matplot::figure_type* f) override;
79
80private:
81 struct Impl;
82 std::unique_ptr<Impl> impl_;
83};
84
87AST_NAMESPACE_END
88
89#endif // AST_WITH_AGG && AST_WITH_MATPLOT