Horizon
frame.hpp
1 #pragma once
2 #include "util/uuid.hpp"
3 #include "nlohmann/json_fwd.hpp"
4 #include "common/common.hpp"
5 #include <vector>
6 #include <map>
7 #include <set>
8 
9 
10 namespace horizon {
11 using json = nlohmann::json;
12 
16 class Frame {
17 public:
18  Frame(const json &j);
19  Frame();
20 
21  enum class Format { NONE, A4_LANDSCAPE, A3_LANDSCAPE };
22  uint64_t get_width() const;
23  uint64_t get_height() const;
24 
25  Format format = Format::A4_LANDSCAPE;
26  uint64_t border = 5_mm;
27 
28  std::pair<Coordi, Coordi> get_bbox() const;
29 
30  json serialize() const;
31 };
32 } // namespace horizon
Border around a sheet.
Definition: frame.hpp:16
a class to store JSON values
Definition: json.hpp:161
Definition: block.cpp:7
basic_json<> json
default JSON class
Definition: json_fwd.hpp:61