added wxImage::IsTransparent(x, y)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@33284 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2005-04-02 21:30:22 +00:00
parent 60b1fda237
commit 21dc4be5d2
4 changed files with 81 additions and 17 deletions

View File

@@ -29,6 +29,7 @@ All (GUI):
- Added wxTE_BESTWRAP (based on patch by Mart Raudsepp).
- wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED is now only sent once at the end of
splitter dragging and not after each CHANGING event (Jacobo Vilella Vilahur).
- Added wxImage::IsTransparent()
Unix:

View File

@@ -270,7 +270,7 @@ Returns number of colours in the histogram.
\membersection{wxImage::ConvertAlphaToMask}\label{wximageconvertalphatomask}
\func{bool}{ConvertAlphaToMask}{\param{unsigned char}{ threshold = 128}}
\func{bool}{ConvertAlphaToMask}{\param{unsigned char}{ threshold = $128$}}
If the image has alpha channel, this method converts it to mask. All pixels
with alpha value less than \arg{threshold} are replaced with mask colour
@@ -708,6 +708,15 @@ of a given handler class in an application session.}
\helpref{wxImageHandler}{wximagehandler}
\membersection{wxImage::IsTransparent}\label{wximageistransparent}
\constfunc{IsTransparent}{\param{int }{x}, \param{int }{y}, \param{unsigned char threshold = $128$}}
Returns \true if the given pixel is transparent, i.e. either has the mask
colour if this image has a mask or if this image has alpha channel and alpha
value of this pixel is strictly less than \arg{threshold}.
\membersection{wxImage::LoadFile}\label{wximageloadfile}
\func{bool}{LoadFile}{\param{const wxString\&}{ name}, \param{long}{ type = wxBITMAP\_TYPE\_ANY}, \param{int}{ index = -1}}