Mercurial > hg > orthanc
diff Core/Images/ImageProcessing.h @ 3258:6f652c7bfc85
ImageProcessing::FillPolygon
author | Alain Mazy <alain@mazy.be> |
---|---|
date | Mon, 18 Feb 2019 18:43:40 +0100 |
parents | 53bb1f4b3844 |
children | 59a184cbb596 |
line wrap: on
line diff
--- a/Core/Images/ImageProcessing.h Mon Feb 18 12:18:15 2019 +0100 +++ b/Core/Images/ImageProcessing.h Mon Feb 18 18:43:40 2019 +0100 @@ -34,6 +34,7 @@ #pragma once #include "ImageAccessor.h" +#include <vector> #include <stdint.h> @@ -41,6 +42,22 @@ { namespace ImageProcessing { + class ImagePoint + { + int32_t x_; + int32_t y_; + + public: + ImagePoint(int32_t x, int32_t y) + : x_(x), + y_(y) + { + } + + int32_t GetX() const {return x_;} + int32_t GetY() const {return y_;} + }; + void Copy(ImageAccessor& target, const ImageAccessor& source); @@ -101,5 +118,9 @@ uint8_t green, uint8_t blue, uint8_t alpha); + + void FillPolygon(ImageAccessor& image, + const std::vector<ImagePoint>& points, + int64_t value); } }