SlideIO 2.0.0
Open-source library for reading of medical images
Loading...
Searching...
No Matches
resolution.hpp
1// This file is part of slideio project.
2// It is subject to the license terms in the LICENSE file found in the top-level directory
3// of this distribution and at http://slideio.com/license.html.
4#pragma once
5#include <cstdint>
6#include <ostream>
7
8namespace slideio
9{
10 class Resolution
11 {
12 public:
13 Resolution() : x(0), y(0) {}
14 Resolution(double _x, double _y) : x(_x), y(_y) {}
15 Resolution(const Resolution& pt) = default;
16 Resolution(Resolution&& pt) noexcept : x(pt.x), y(pt.y) {
17 pt.x = 0;
18 pt.y = 0;
19 }
20 ~Resolution() = default;
21 Resolution& operator = (const Resolution& pt) = default;
22 Resolution& operator = (Resolution&& pt) noexcept {
23 x = pt.x;
24 y = pt.y;
25 pt.x = 0;
26 pt.y = 0;
27 return *this;
28 }
29 bool operator == (const Resolution& pt) const {
30 return x == pt.x && y == pt.y;
31 }
32 double x;
33 double y;
34 };
35
36}
Definition: exceptions.hpp:15