diff OrthancFramework/Sources/Images/ImageProcessing.h @ 4872:b1556cefa5c6

reimplementation from scratch of ImageProcessing::FillPolygon()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 17 Jan 2022 21:11:40 +0100
parents 43e613a7756b
children dfbe764995cf
line wrap: on
line diff
--- a/OrthancFramework/Sources/Images/ImageProcessing.h	Tue Jan 11 14:35:29 2022 +0100
+++ b/OrthancFramework/Sources/Images/ImageProcessing.h	Mon Jan 17 21:11:40 2022 +0100
@@ -64,6 +64,18 @@
                                double c) const; // where ax + by + c = 0 is the equation of the line
     };
 
+    class ORTHANC_PUBLIC IPolygonFiller : public boost::noncopyable
+    {
+    public:
+      virtual ~IPolygonFiller()
+      {
+      }
+
+      virtual void Fill(int y,
+                        int x1,
+                        int x2) = 0;
+    };
+
     static void Copy(ImageAccessor& target,
                      const ImageAccessor& source);
 
@@ -160,6 +172,9 @@
                                 uint8_t blue,
                                 uint8_t alpha);
 
+    static void FillPolygon(IPolygonFiller& filler,
+                            const std::vector<ImagePoint>& points);
+
     static void FillPolygon(ImageAccessor& image,
                             const std::vector<ImagePoint>& points,
                             int64_t value);