forked from Fedomer/matplotlibcpp17
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtext.h
More file actions
45 lines (35 loc) · 1.08 KB
/
Copy pathtext.h
File metadata and controls
45 lines (35 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/**
* @file text.h
* @brief corresponding header for matplotlib.text
**/
#ifndef MATPLOTLIBCPP17_TEXT_H
#define MATPLOTLIBCPP17_TEXT_H
#include <matplotlibcpp17/common.h>
#include <pybind11/pybind11.h>
/**
* @brief A wrapper class for matplotlib.text.Text
**/
namespace matplotlibcpp17::text {
struct DECL_STRUCT_ATTR Text : public BaseWrapper {
public:
Text(const pybind11::object &text) {
self = text;
load_attrs();
}
Text(pybind11::object &&text) {
self = std::move(text);
load_attrs();
}
ObjectWrapper set_rotation(const pybind11::tuple &args = pybind11::tuple(),
const pybind11::dict &kwargs = pybind11::dict());
private:
void load_attrs() { LOAD_FUNC_ATTR(set_rotation, self); }
pybind11::object set_rotation_attr;
};
ObjectWrapper Text::set_rotation(const pybind11::tuple &args,
const pybind11::dict &kwargs) {
pybind11::object ret = set_rotation_attr(*args, **kwargs);
return ObjectWrapper(std::move(ret));
}
} // namespace matplotlibcpp17::text
#endif /* MATPLOTLIBCPP17_TEXT_H */