]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/image.cpp
compilation fix after last change
[wxWidgets.git] / src / common / image.cpp
index be43304ba96464fd14a550bdf7d67056c8526570..8d341247276000e8ce764befca84c300c4343259 100644 (file)
@@ -754,20 +754,17 @@ wxImage wxImage::BlurHorizontal(int blurRadius)
     unsigned char* dst_alpha = NULL;
 
     // Check for a mask or alpha
-    if ( M_IMGDATA->m_hasMask )
+    if ( src_alpha )
+    {
+        ret_image.SetAlpha();
+        dst_alpha = ret_image.GetAlpha();
+    }
+    else if ( M_IMGDATA->m_hasMask )
     {
         ret_image.SetMaskColour(M_IMGDATA->m_maskRed,
                                 M_IMGDATA->m_maskGreen,
                                 M_IMGDATA->m_maskBlue);
     }
-    else
-    {
-        if ( src_alpha )
-        {
-            ret_image.SetAlpha();
-            dst_alpha = ret_image.GetAlpha();
-        }
-    }
 
     // number of pixels we average over
     const int blurArea = blurRadius*2 + 1;
@@ -872,20 +869,17 @@ wxImage wxImage::BlurVertical(int blurRadius)
     unsigned char* dst_alpha = NULL;
 
     // Check for a mask or alpha
-    if ( M_IMGDATA->m_hasMask )
+    if ( src_alpha )
+    {
+        ret_image.SetAlpha();
+        dst_alpha = ret_image.GetAlpha();
+    }
+    else if ( M_IMGDATA->m_hasMask )
     {
         ret_image.SetMaskColour(M_IMGDATA->m_maskRed,
                                 M_IMGDATA->m_maskGreen,
                                 M_IMGDATA->m_maskBlue);
     }
-    else
-    {
-        if ( src_alpha )
-        {
-            ret_image.SetAlpha();
-            dst_alpha = ret_image.GetAlpha();
-        }
-    }
 
     // number of pixels we average over
     const int blurArea = blurRadius*2 + 1;