Mercurial > hg > orthanc
comparison OrthancFramework/Sources/Images/ImageProcessing.cpp @ 4300:b30a8de92ad9
abi continued
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 05 Nov 2020 19:33:18 +0100 |
parents | 785a2713323e |
children | d9473bd5ed43 |
comparison
equal
deleted
inserted
replaced
4299:3f85db78c441 | 4300:b30a8de92ad9 |
---|---|
47 #include <stdint.h> | 47 #include <stdint.h> |
48 #include <algorithm> | 48 #include <algorithm> |
49 | 49 |
50 namespace Orthanc | 50 namespace Orthanc |
51 { | 51 { |
52 ImageProcessing::ImagePoint::ImagePoint(int32_t x, | |
53 int32_t y) : | |
54 x_(x), | |
55 y_(y) | |
56 { | |
57 } | |
58 | |
59 int32_t ImageProcessing::ImagePoint::GetX() const | |
60 { | |
61 return x_; | |
62 } | |
63 | |
64 int32_t ImageProcessing::ImagePoint::GetY() const | |
65 { | |
66 return y_; | |
67 } | |
68 | |
69 void ImageProcessing::ImagePoint::Set(int32_t x, int32_t y) | |
70 { | |
71 x_ = x; | |
72 y_ = y; | |
73 } | |
74 | |
52 void ImageProcessing::ImagePoint::ClipTo(int32_t minX, int32_t maxX, int32_t minY, int32_t maxY) | 75 void ImageProcessing::ImagePoint::ClipTo(int32_t minX, int32_t maxX, int32_t minY, int32_t maxY) |
53 { | 76 { |
54 x_ = std::max(minX, std::min(maxX, x_)); | 77 x_ = std::max(minX, std::min(maxX, x_)); |
55 y_ = std::max(minY, std::min(maxY, y_)); | 78 y_ = std::max(minY, std::min(maxY, y_)); |
56 } | 79 } |