lines-are-beautiful  0.0
A C++ file API for the reMarkable e-ink tablet
Page.hpp
Go to the documentation of this file.
1 /* Copyright 2017-2018 Axel Huebl
2  *
3  * This file is part of lines-are-beautiful.
4  *
5  * lines-are-beautiful is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * lines-are-beautiful is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with lines-are-beautiful.
17  * If not, see <http://www.gnu.org/licenses/>.
18  */
19 
25 #pragma once
26 
27 #include "Layer.hpp"
28 
29 #include <cstdint> // int8_t - int64_t
30 #include <list>
31 
32 
33 namespace rmlab
34 {
44  struct Page
45  {
49  int32_t nlayers;
50 
55  std::list< Layer > layers;
56  };
57 
58  inline Page make_page( std::list< Layer > layers = std::list< Layer >{} )
59  {
60  Page newPage;
61  newPage.nlayers = layers.size();
62  newPage.layers = layers;
63 
64  return newPage;
65  }
66 }
Definition: Layer.hpp:33
Definition: Page.hpp:44
std::list< Layer > layers
Definition: Page.hpp:55
int32_t nlayers
Definition: Page.hpp:49