]> granicus.if.org Git - imagemagick/commitdiff
alphaColor deprecated and changed to matteColor in Magick++ to remain compatible...
authorCristy <urban-warrior@imagemagick.org>
Thu, 16 Feb 2017 15:41:42 +0000 (10:41 -0500)
committerCristy <urban-warrior@imagemagick.org>
Thu, 16 Feb 2017 15:41:42 +0000 (10:41 -0500)
Magick++/lib/Image.cpp
Magick++/lib/Magick++/Image.h
Magick++/lib/Magick++/Montage.h
Magick++/lib/Magick++/Options.h
Magick++/lib/Magick++/STL.h
Magick++/lib/Montage.cpp
Magick++/lib/Options.cpp
Magick++/lib/STL.cpp
Magick++/tests/attributes.cpp

index 34a367b8df149e06c5df63b6a2f055fe14e05e4b..52de0a0bf089b68de1228ebd7fc9f69e9a1c6c93 100644 (file)
@@ -327,27 +327,27 @@ bool Magick::Image::alpha(void) const
     return(false);
 }
 
-void Magick::Image::alphaColor(const Color &alphaColor_)
+void Magick::Image::matteColor(const Color &matteColor_)
 {
   modifyImage();
 
-  if (alphaColor_.isValid())
+  if (matteColor_.isValid())
     {
-      image()->alpha_color=alphaColor_;
-      options()->alphaColor(alphaColor_);
+      image()->matte_color=matteColor_;
+      options()->matteColor(matteColor_);
     }
   else
     {
       // Set to default matte color
       Color tmpColor("#BDBDBD");
-      image()->alpha_color=tmpColor;
-      options()->alphaColor(tmpColor);
+      image()->matte_color=tmpColor;
+      options()->matteColor(tmpColor);
     }
 }
 
-Magick::Color Magick::Image::alphaColor(void) const
+Magick::Color Magick::Image::matteColor(void) const
 {
-  return(Color(constImage()->alpha_color));
+  return(Color(constImage()->matte_color));
 }
 
 void Magick::Image::animationDelay(const size_t delay_)
index 89901d0370943447f181e4a42f7a5189c636035e..68bb56db09bd0575cb22c5f232fdb902a1cfd983 100644 (file)
@@ -106,8 +106,8 @@ namespace Magick
     bool alpha(void) const;
 
     // Transparent color
-    void alphaColor(const Color &alphaColor_);
-    Color alphaColor(void) const;
+    void matteColor(const Color &matteColor_);
+    Color matteColor(void) const;
 
     // Time in 1/100ths of a second which must expire before
     // displaying the next image in an animated sequence.
index 3b604b89060379c1c64dbb5f85b119603b644617..61a161df076afcb3e6b745322d839741c4a3acb2 100644 (file)
@@ -121,8 +121,8 @@ namespace Magick
     ~MontageFramed(void);
 
     // Frame foreground color
-    void alphaColor(const Color &alphaColor_);
-    Color alphaColor(void) const;
+    void matteColor(const Color &matteColor_);
+    Color matteColor(void) const;
 
     // Frame border color
     void borderColor(const Color &borderColor_);
@@ -145,7 +145,7 @@ namespace Magick
 
   private:
 
-    Color _alphaColor;
+    Color _matteColor;
     Color _borderColor;
     size_t _borderWidth;
     Geometry _frame;
index 57f09adac8254b9b2fbb0ab332c6f7978cce5d0a..e7b127de97fd620f6c66a1e948ba904ebc479b00 100644 (file)
@@ -43,8 +43,8 @@ namespace Magick
     bool adjoin(void) const;
 
     // Transparent color
-    void alphaColor(const Color &alphaColor_);
-    Color alphaColor(void) const;
+    void matteColor(const Color &matteColor_);
+    Color matteColor(void) const;
 
     // Image background color
     void backgroundColor(const Color &color_);
index 862afc85bda25c8ccc65567f7945e670b4f780ae..0506cfa056f487e1ea7087fe51f0b40ef905b753 100644 (file)
@@ -1551,15 +1551,15 @@ namespace Magick
   };
 
   // Transparent color
-  class MagickPPExport alphaColorImage
+  class MagickPPExport matteColorImage
   {
   public:
-    alphaColorImage( const Color &alphaColor_ );
+    matteColorImage( const Color &matteColor_ );
 
     void operator()( Image &image_ ) const;
 
   private:
-    Color _alphaColor;
+    Color _matteColor;
   };
 
   // Indicate that image is black and white
index 4c0d47e9c3724ce26c3569793faf00328be57651..f82367e498d4637acf520e04e1cf12e587567909 100644 (file)
@@ -181,8 +181,8 @@ void Magick::Montage::updateMontageInfo(MontageInfo &montageInfo_ ) const
 {
   (void) MagickCore::ResetMagickMemory(&montageInfo_,0,sizeof(montageInfo_));
 
-  // alpha_color
-  montageInfo_.alpha_color=Color();
+  // matte_color
+  montageInfo_.matte_color=Color();
   // background_color
   montageInfo_.background_color=_backgroundColor;
   // border_color
@@ -230,7 +230,7 @@ void Magick::Montage::updateMontageInfo(MontageInfo &montageInfo_ ) const
 //
 
 Magick::MontageFramed::MontageFramed(void)
-  : _alphaColor("#bdbdbd"),
+  : _matteColor("#bdbdbd"),
     _borderColor("#dfdfdf"),
     _borderWidth(0),
     _frame()
@@ -241,14 +241,14 @@ Magick::MontageFramed::~MontageFramed(void)
 {
 }
 
-void Magick::MontageFramed::alphaColor(const Magick::Color &alphaColor_)
+void Magick::MontageFramed::matteColor(const Magick::Color &matteColor_)
 {
-  _alphaColor=alphaColor_;
+  _matteColor=matteColor_;
 }
 
-Magick::Color Magick::MontageFramed::alphaColor(void) const
+Magick::Color Magick::MontageFramed::matteColor(void) const
 {
-  return(_alphaColor);
+  return(_matteColor);
 }
 
 void Magick::MontageFramed::borderColor(const Magick::Color &borderColor_)
@@ -286,8 +286,8 @@ void Magick::MontageFramed::updateMontageInfo(MontageInfo &montageInfo_) const
   // Do base updates
   Montage::updateMontageInfo(montageInfo_);
 
-  // alpha_color
-  montageInfo_.alpha_color = _alphaColor;
+  // matte_color
+  montageInfo_.matte_color = _matteColor;
   // border_color
   montageInfo_.border_color=_borderColor;
   // border_width
index 8cb0fec3ad1015a9ab8f8565d88eafe5ad5bc060..447d78da65ed8993a8482d0afe541a6f69a5b0a6 100644 (file)
@@ -73,14 +73,14 @@ bool Magick::Options::adjoin(void) const
   return(static_cast<bool>(_imageInfo->adjoin));
 }
 
-void Magick::Options::alphaColor(const Color &alphaColor_)
+void Magick::Options::matteColor(const Color &matteColor_)
 {
-  _imageInfo->alpha_color=alphaColor_;
+  _imageInfo->matte_color=matteColor_;
 }
 
-Magick::Color Magick::Options::alphaColor(void) const
+Magick::Color Magick::Options::matteColor(void) const
 {
-  return(Magick::Color(_imageInfo->alpha_color));
+  return(Magick::Color(_imageInfo->matte_color));
 }
 
 void Magick::Options::backgroundColor(const Color &color_)
index 77868b3f4bb2c9826ff9dcb31a98d730ed744d5a..827f1bee4662a9fa849f57acb3bd540f8cfec5ed 100644 (file)
@@ -1412,13 +1412,13 @@ void Magick::alphaFlagImage::operator()( Magick::Image &image_ ) const
 }
 
 // Transparent color
-Magick::alphaColorImage::alphaColorImage( const Color &alphaColor_ )
-  : _alphaColor( alphaColor_ )
+Magick::matteColorImage::matteColorImage( const Color &matteColor_ )
+  : _matteColor( matteColor_ )
 {
 }
-void Magick::alphaColorImage::operator()( Magick::Image &image_ ) const
+void Magick::matteColorImage::operator()( Magick::Image &image_ ) const
 {
-  image_.alphaColor( _alphaColor );
+  image_.matteColor( _matteColor );
 }
 
 // Indicate that image is black and white
index 99a4bf3a584aa1849afd3523b6ec07a95c66710a..d7dcbfb7b5bc6b0729002003bf0660b0ae83f97f 100644 (file)
@@ -930,28 +930,28 @@ int main( int /*argc*/, char ** argv)
     image.alpha(false);
 
     //
-    // alphaColor
+    // matteColor
     //
     // Test default
-    if ( image.alphaColor() != Color("#BDBDBD") )
+    if ( image.matteColor() != Color("#BDBDBD") )
       {
        ++failures;
        cout << "Line: " << __LINE__
-             << ", alphaColor default is not #BDBDBD as expected" << endl;
+             << ", matteColor default is not #BDBDBD as expected" << endl;
       }
 
     // Test set/get
-    image.alphaColor(ColorRGB(0.5,0.5,1));
-    if ( image.alphaColor() != ColorRGB(0.5,0.5,1) )
+    image.matteColor(ColorRGB(0.5,0.5,1));
+    if ( image.matteColor() != ColorRGB(0.5,0.5,1) )
       {
        ++failures;
-       cout << "Line: " << __LINE__ << ", alphaColor set/get failed" << endl;
+       cout << "Line: " << __LINE__ << ", matteColor set/get failed" << endl;
       }
 
     // Test unset
-    image.alphaColor( Color() );
+    image.matteColor( Color() );
 
-    image.alphaColor("#BDBDBD");
+    image.matteColor("#BDBDBD");
 
     //
     // meanErrorPerPixel