X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e119d0498a529d438d337a8b788c5b2333a20f93..3e79fa7534162386335ee0d3994afe64c7fa2ca1:/docs/latex/wx/image.tex

diff --git a/docs/latex/wx/image.tex b/docs/latex/wx/image.tex
index 4709f20fa6..fd4451655d 100644
--- a/docs/latex/wx/image.tex
+++ b/docs/latex/wx/image.tex
@@ -17,7 +17,7 @@ creation of a \helpref{wxMask}{wxmask} object associated to the bitmap object.
 
 \wxheading{Alpha channel support}
 
-Starting from wxWindows 2.5.0 wxImage supports alpha channel data, that is in
+Starting from wxWidgets 2.5.0 wxImage supports alpha channel data, that is in
 addition to a byte for the red, green and blue colour components for each pixel
 it also stores a byte representing the pixel opacity. The alpha value of $0$
 corresponds to a transparent pixel (null opacity) while the value of $255$
@@ -154,7 +154,7 @@ the GIF and TIFF handler and as the largest and most colourful one by the ICO ha
 
 \wxheading{Remarks}
 
-Depending on how wxWindows has been configured, not all formats may be available.
+Depending on how wxWidgets has been configured, not all formats may be available.
 
 Note: any handler other than BMP must be previously
 initialized with \helpref{wxImage::AddHandler}{wximageaddhandler} or 
@@ -229,7 +229,7 @@ returns true if the current image handlers can read this file
 
 Deletes all image handlers.
 
-This function is called by wxWindows on exit.
+This function is called by wxWidgets on exit.
 
 \membersection{wxImage::ComputeHistogram}\label{wximagecomputehistogram}
 
@@ -257,6 +257,22 @@ WX_DECLARE_EXPORTED_HASH_MAP(unsigned long, wxImageHistogramEntry,
 
 Returns number of colours in the histogram.
 
+\membersection{wxImage::ConvertAlphaToMask}\label{wximageconvertalphatomask}
+
+\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
+and the alpha channel is removed. Mask colour is chosen automatically using
+\helpref{FindFirstUnusedColour}{wximagefindfirstunusedcolour}.
+
+If the image image doesn't have alpha channel,
+ConvertAlphaToMask does nothing.
+
+\wxheading{Return value}
+
+\false if FindFirstUnusedColour returns \false, \true otherwise. 
+
 \membersection{wxImage::ConvertToBitmap}\label{wximageconverttobitmap}
 
 \constfunc{wxBitmap}{ConvertToBitmap}{\void}
@@ -414,8 +430,10 @@ Returns the blue intensity at the given coordinate.
 Returns the image data as an array. This is most often used when doing
 direct image manipulation. The return value points to an array of
 characters in RGBRGBRGB$\ldots$ format in the top-to-bottom, left-to-right
-order, that is the first RGB triplet corresponds to the pixel $(0, 0)$, the
-second one --- to $(0, 1)$ and so on.
+order, that is the first RGB triplet corresponds to the pixel first pixel of
+the first row, the second one --- to the second pixel of the first row and so
+on until the end of the first row, with second row following after it and so
+on.
 
 You should not delete the returned pointer nor pass it to
 \helpref{wxImage::SetData}{wximagesetdata}.
@@ -591,7 +609,7 @@ Returns true if the given option is present. The function is case-insensitive to
 Internal use only. Adds standard image format handlers. It only install BMP
 for the time being, which is used by wxBitmap.
 
-This function is called by wxWindows on startup, and shouldn't be called by
+This function is called by wxWidgets on startup, and shouldn't be called by
 the user.
 
 \wxheading{See also}
@@ -660,7 +678,7 @@ the GIF and TIFF handler and as the largest and most colourful one by the ICO ha
 
 \wxheading{Remarks}
 
-Depending on how wxWindows has been configured, not all formats may be available.
+Depending on how wxWidgets has been configured, not all formats may be available.
 
 Note: you can use \helpref{GetOptionInt}{wximagegetoptionint} to get the 
 hotspot for loaded cursor file:
@@ -815,7 +833,7 @@ true if the operation succeeded, false otherwise.
 
 \wxheading{Remarks}
 
-Depending on how wxWindows has been configured, not all formats may be available.
+Depending on how wxWidgets has been configured, not all formats may be available.
 
 Note: you can use \helpref{GetOptionInt}{wximagegetoptionint} to set the 
 hotspot before saving an image into a cursor file (default hotspot is in 
@@ -1046,7 +1064,7 @@ application initialisation.
 
 This software is based in part on the work of the Independent JPEG Group.
 
-(Applies when wxWindows is linked with JPEG support. wxJPEGHandler uses libjpeg
+(Applies when wxWidgets is linked with JPEG support. wxJPEGHandler uses libjpeg
 created by IJG.)
 
 \wxheading{Derived from}
