X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f4fcc2919776cffa5e3b2f0d44dd24c41e652ff4..93f467a3b4d1eda959b44cc01df34b4463383cfe:/docs/latex/wx/region.tex diff --git a/docs/latex/wx/region.tex b/docs/latex/wx/region.tex index 0ca8231cdf..60118cf9f0 100644 --- a/docs/latex/wx/region.tex +++ b/docs/latex/wx/region.tex @@ -43,11 +43,19 @@ Constructs a region by copying another region. \func{}{wxRegion}{\param{size\_t}{ n}, \param{const wxPoint }{*points}, \param{int }{fillStyle = wxWINDING\_RULE}} Constructs a region corresponding to the polygon made of {\it n} points in the -provided array. {\it fillStyle} parameter may have values +provided array. {\it fillStyle} parameter may have values {\tt wxWINDING\_RULE} or {\tt wxODDEVEN\_RULE}. {\bf NB:} This constructor is only implemented for Win32 and GTK+ wxWindows ports. +\func{}{wxRegion}{\param{const wxBitmap\&}{ bmp}, + \param{const wxColour\&}{ transColour = wxNullColour}, + \param{int}{ tolerance = 0}} + +Constructs a region using the non-transparent pixels of a bitmap. See +\helpref{Union}{wxregionunion} for more details. + + \membersection{wxRegion::\destruct{wxRegion}} \func{}{\destruct{wxRegion}}{\void} @@ -85,6 +93,13 @@ The return value is one of wxOutRegion, wxPartRegion and wxInRegion. On Windows, only wxOutRegion and wxInRegion are returned; a value wxInRegion then indicates that all or some part of the region is contained in this region. +\membersection{wxRegion::ConvertToBitmap}\label{wxregionconverttobitmap} + +\constfunc{wxBitmap}{ConvertToBitmap}{} + +Convert the region to a black and white bitmap with the white pixels +being inside the region. + \membersection{wxRegion::GetBox}\label{wxregiongetbox} \constfunc{void}{GetBox}{\param{long\& }{x}, \param{long\& }{y}, \param{long\& }{width}, \param{long\& }{height}} @@ -111,7 +126,7 @@ Finds the intersection of this region and another region. \wxheading{Return value} -{\tt TRUE} if successful, {\tt FALSE} otherwise. +{\tt true} if successful, {\tt false} otherwise. \wxheading{Remarks} @@ -122,7 +137,7 @@ is stored in this region. \constfunc{bool}{IsEmpty}{\void} -Returns {\tt TRUE} if the region is empty, {\tt FALSE} otherwise. +Returns {\tt true} if the region is empty, {\tt false} otherwise. \membersection{wxRegion::Subtract}\label{wxregionsubstract} @@ -136,7 +151,7 @@ Subtracts a region from this region. \wxheading{Return value} -{\tt TRUE} if successful, {\tt FALSE} otherwise. +{\tt true} if successful, {\tt false} otherwise. \wxheading{Remarks} @@ -152,7 +167,7 @@ directions. \wxheading{Return value} -{\tt TRUE} if successful, {\tt FALSE} otherwise (the region is unchanged then). +{\tt true} if successful, {\tt false} otherwise (the region is unchanged then). \membersection{wxRegion::Union}\label{wxregionunion} @@ -168,9 +183,18 @@ Finds the union of this region and another, rectangular region. Finds the union of this region and another region. +\func{bool}{Union}{\param{const wxBitmap\&}{ bmp}, + \param{const wxColour\&}{ transColour = wxNullColour}, + \param{int}{ tolerance = 0}} + +Finds the union of this region and the the non-transparent pixels of a +bitmap. If the bitmap has a mask then it will be used, otherwise the +colour to be treated as transparent may be specified, along with an +optional colour tolerance value. + \wxheading{Return value} -{\tt TRUE} if successful, {\tt FALSE} otherwise. +{\tt true} if successful, {\tt false} otherwise. \wxheading{Remarks} @@ -193,7 +217,7 @@ Finds the Xor of this region and another region. \wxheading{Return value} -{\tt TRUE} if successful, {\tt FALSE} otherwise. +{\tt true} if successful, {\tt false} otherwise. \wxheading{Remarks} @@ -286,7 +310,7 @@ Returns the current rectangle. \constfunc{bool}{HaveRects}{\void} -Returns {\tt TRUE} if there are still some rectangles; otherwise returns {\tt FALSE}. +Returns {\tt true} if there are still some rectangles; otherwise returns {\tt false}. \membersection{wxRegionIterator::Reset} @@ -310,7 +334,7 @@ Increment operator. Increments the iterator to the next region. \constfunc{}{operator bool}{\void} -Returns {\tt TRUE} if there are still some rectangles; otherwise returns {\tt FALSE}. +Returns {\tt true} if there are still some rectangles; otherwise returns {\tt false}. You can use this to test the iterator object as if it were of type bool.