}
// Blur in the horizontal direction
-wxImage wxImage::BlurHorizontal(int blurRadius)
+wxImage wxImage::BlurHorizontal(int blurRadius) const
{
wxImage ret_image;
ret_image.Create(M_IMGDATA->m_width, M_IMGDATA->m_height, false);
}
// Blur in the vertical direction
-wxImage wxImage::BlurVertical(int blurRadius)
+wxImage wxImage::BlurVertical(int blurRadius) const
{
wxImage ret_image;
ret_image.Create(M_IMGDATA->m_width, M_IMGDATA->m_height, false);
}
// The new blur function
-wxImage wxImage::Blur(int blurRadius)
+wxImage wxImage::Blur(int blurRadius) const
{
wxImage ret_image;
ret_image.Create(M_IMGDATA->m_width, M_IMGDATA->m_height, false);
alpha = (unsigned char *)malloc(M_IMGDATA->m_width*M_IMGDATA->m_height);
}
- free(M_IMGDATA->m_alpha);
+ if( !M_IMGDATA->m_staticAlpha )
+ free(M_IMGDATA->m_alpha);
+
M_IMGDATA->m_alpha = alpha;
M_IMGDATA->m_staticAlpha = static_data;
}
}
}
- free(M_IMGDATA->m_alpha);
+ if( !M_IMGDATA->m_staticAlpha )
+ free(M_IMGDATA->m_alpha);
+
M_IMGDATA->m_alpha = NULL;
+ M_IMGDATA->m_staticAlpha = false;
return true;
}
node = node->GetNext();
}
- return 0;
+ return NULL;
}
wxImageHandler *wxImage::FindHandler( const wxString& extension, long bitmapType )
return handler;
node = node->GetNext();
}
- return 0;
+ return NULL;
}
wxImageHandler *wxImage::FindHandler( long bitmapType )
if (handler->GetType() == bitmapType) return handler;
node = node->GetNext();
}
- return 0;
+ return NULL;
}
wxImageHandler *wxImage::FindHandlerMime( const wxString& mimetype )
if (handler->GetMimeType().IsSameAs(mimetype, false)) return handler;
node = node->GetNext();
}
- return 0;
+ return NULL;
}
void wxImage::InitStandardHandlers()