Mir
rectangle.h
Go to the documentation of this file.
1 /*
2  * Copyright © 2012, 2016 Canonical Ltd.
3  *
4  * This program is free software: you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License version 2 or 3,
6  * as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  */
16 
17 #ifndef MIR_GEOMETRY_RECTANGLE_H_
18 #define MIR_GEOMETRY_RECTANGLE_H_
19 
20 #include "rectangle_generic.h"
21 #include "point.h"
22 #include "size.h"
23 #include "displacement.h"
24 
25 namespace mir
26 {
27 namespace geometry
28 {
29 
30 struct Rectangle : generic::Rectangle<Point, Size>
31 {
33 
35  {
36  return intersection_of(*this, r);
37  }
38 };
39 }
40 }
41 
42 #endif /* MIR_GEOMETRY_RECTANGLE_H_ */
R intersection_of(R const &a, R const &b)
Definition: rectangle_generic.h:114
Definition: splash_session.h:22
Definition: rectangle.h:31
Rectangle intersection_with(Rectangle const &r) const
Definition: rectangle.h:34
Definition: rectangle_generic.h:38

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.