]> granicus.if.org Git - imagemagick/commitdiff
Added new invert parameter to opaque.
authordirk <dirk@git.imagemagick.org>
Thu, 12 Jun 2014 18:48:15 +0000 (18:48 +0000)
committerdirk <dirk@git.imagemagick.org>
Thu, 12 Jun 2014 18:48:15 +0000 (18:48 +0000)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h

index 5bb7d9fcb01c9c82ab7f136dba36e4da33454534..ead6350620f04fbbf1b5d58b7529a5b348f698a7 100644 (file)
@@ -3584,7 +3584,8 @@ void Magick::Image::oilPaint(const double radius_,const double sigma_)
   ThrowPPException;
 }
 
-void Magick::Image::opaque(const Color &opaqueColor_,const Color &penColor_)
+void Magick::Image::opaque(const Color &opaqueColor_,const Color &penColor_,
+  const bool invert_)
 {
   std::string
     opaqueColor,
@@ -3609,7 +3610,8 @@ void Magick::Image::opaque(const Color &opaqueColor_,const Color &penColor_)
     &exceptionInfo);
   (void) QueryColorCompliance(penColor.c_str(),AllCompliance,&pen,
     &exceptionInfo);
-  OpaquePaintImage(image(),&opaque,&pen,MagickFalse,&exceptionInfo);
+  OpaquePaintImage(image(),&opaque,&pen,invert_ ? MagickTrue : MagickFalse,
+    &exceptionInfo);
   ThrowPPException;
 }
 
index edb70e995ac11b3bf6cae6734abe1bb146a857da..c4316abee986aaea0be728e399474d61399719d6 100644 (file)
@@ -1078,7 +1078,8 @@ namespace Magick
     void oilPaint(const double radius_=0.0,const double sigma=1.0);
 
     // Change color of opaque pixel to specified pen color.
-    void opaque(const Color &opaqueColor_,const Color &penColor_);
+    void opaque(const Color &opaqueColor_,const Color &penColor_,
+      const bool invert_=false);
 
     // Perform a ordered dither based on a number of pre-defined dithering
     // threshold maps, but over multiple intensity levels.