X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1542ea396a625766c59d683adbb1d613c1344d50..b0b96f667dbc2fc2d3ebaa342c50bdea10f84a91:/docs/latex/wx/region.tex diff --git a/docs/latex/wx/region.tex b/docs/latex/wx/region.tex index 1f26deea5d..5b2cb77be1 100644 --- a/docs/latex/wx/region.tex +++ b/docs/latex/wx/region.tex @@ -18,7 +18,8 @@ reference counting, so copying and assignment operations are fast. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxRegion::wxRegion}\label{wxregionconstr} + +\membersection{wxRegion::wxRegion}\label{wxregionctor} \func{}{wxRegion}{\void} @@ -38,7 +39,7 @@ Constructs a rectangular region a wxRect object. \func{}{wxRegion}{\param{const wxRegion\&}{ region}} -Constructs a region by copying another region. +Copy constructor, uses \helpref{reference counting}{trefcount}. \func{}{wxRegion}{\param{size\_t}{ n}, \param{const wxPoint }{*points}, \param{int }{fillStyle = wxWINDING\_RULE}} @@ -46,21 +47,26 @@ Constructs a region corresponding to the polygon made of {\it n} points in the 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. +{\bf NB:} This constructor is only implemented for Win32 and GTK+ wxWidgets ports. + +\func{}{wxRegion}{\param{const wxBitmap\&}{ bmp}} -\func{}{wxRegion}{\param{const wxBitmap&}{ bmp}, - \param{const wxColour&}{ transColour = wxNullColour}, - \param{int}{ tolerance = 0}} +\func{}{wxRegion}{\param{const wxBitmap\&}{ bmp}, + \param{const wxColour\&}{ transColour}, + \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}} + +\membersection{wxRegion::\destruct{wxRegion}}\label{wxregiondtor} \func{}{\destruct{wxRegion}}{\void} Destructor. +See \helpref{reference-counted object destruction}{refcountdestruct} for more info. + \membersection{wxRegion::Clear}\label{wxregionclear} @@ -68,6 +74,7 @@ Destructor. Clears the current region. + \membersection{wxRegion::Contains}\label{wxregioncontains} \constfunc{wxRegionContain}{Contains}{\param{long\& }{x}, \param{long\& }{y}} @@ -93,16 +100,18 @@ 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 black pixels +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}} +\constfunc{void}{GetBox}{\param{wxCoord\& }{x}, \param{wxCoord\& }{y}, \param{wxCoord\& }{width}, \param{wxCoord\& }{height}} Returns the outer bounds of the region. @@ -110,6 +119,7 @@ Returns the outer bounds of the region. Returns the outer bounds of the region. + \membersection{wxRegion::Intersect}\label{wxregionintersect} \func{bool}{Intersect}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} @@ -133,13 +143,24 @@ Finds the intersection of this region and another region. Creates the intersection of the two regions, that is, the parts which are in both regions. The result is stored in this region. + \membersection{wxRegion::IsEmpty}\label{wxregionisempty} \constfunc{bool}{IsEmpty}{\void} Returns {\tt true} if the region is empty, {\tt false} otherwise. -\membersection{wxRegion::Subtract}\label{wxregionsubstract} + +\membersection{wxRegion::IsEqual}\label{wxregionisequal} + +\constfunc{bool}{IsEqual}{\param{const wxRegion\& }{region}} + +Returns {\tt true} if the region is equal to, i.e. covers the same area as, +another one. Note that if both this region and \arg{region} are invalid, they +are considered to be equal. + + +\membersection{wxRegion::Subtract}\label{wxregionsubtract} \func{bool}{Subtract}{\param{const wxRect\&}{ rect}} @@ -158,10 +179,13 @@ Subtracts a region from this region. This operation combines the parts of 'this' region that are not part of the second region. The result is stored in this region. + \membersection{wxRegion::Offset}\label{wxregionoffset} \func{bool}{Offset}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} +\func{bool}{Offset}{\param{const wxPoint\& }{ pt}} + Moves the region by the specified offsets in horizontal and vertical directions. @@ -169,6 +193,7 @@ directions. {\tt true} if successful, {\tt false} otherwise (the region is unchanged then). + \membersection{wxRegion::Union}\label{wxregionunion} \func{bool}{Union}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} @@ -183,13 +208,19 @@ 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}} +\func{bool}{Union}{\param{const wxBitmap\&}{ bmp}} + +Finds the union of this region and the non-transparent pixels of a +bitmap. Bitmap's mask is used to determine transparency. If the bitmap doesn't +have a mask, solid rectangle of bitmap's dimensions is used. -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 +\func{bool}{Union}{\param{const wxBitmap\&}{ bmp}, + \param{const wxColour\&}{ transColour}, + \param{int}{ tolerance = 0}} + +Finds the union of this region and the non-transparent pixels of a +bitmap. Colour to be treated as transparent is specified in the +\arg{transColour} argument, along with an optional colour tolerance value. \wxheading{Return value} @@ -201,6 +232,7 @@ optional colour tolerance value. This operation creates a region that combines all of this region and the second region. The result is stored in this region. + \membersection{wxRegion::Xor}\label{wxregionxor} \func{bool}{Xor}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} @@ -224,11 +256,14 @@ Finds the Xor of this region and another region. This operation creates a region that combines all of this region and the second region, except for any overlapping areas. The result is stored in this region. + \membersection{wxRegion::operator $=$}\label{wxregionassign} \func{void}{operator $=$}{\param{const wxRegion\&}{ region}} -Copies {\it region} by reference counting. +Assignment operator, using \helpref{reference counting}{trefcount}. + + \section{\class{wxRegionIterator}}\label{wxregioniterator} @@ -254,7 +289,8 @@ See \helpref{wxPaintEvent}{wxpaintevent} for an example of use. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxRegionIterator::wxRegionIterator} + +\membersection{wxRegionIterator::wxRegionIterator}\label{wxregioniteratorctor} \func{}{wxRegionIterator}{\void} @@ -264,55 +300,64 @@ Default constructor. Creates an iterator object given a region. -\membersection{wxRegionIterator::GetX} + +\membersection{wxRegionIterator::GetX}\label{wxregioniteratorgetx} \constfunc{wxCoord}{GetX}{\void} Returns the x value for the current region. -\membersection{wxRegionIterator::GetY} + +\membersection{wxRegionIterator::GetY}\label{wxregioniteratorgety} \constfunc{wxCoord}{GetY}{\void} Returns the y value for the current region. -\membersection{wxRegionIterator::GetW} + +\membersection{wxRegionIterator::GetW}\label{wxregioniteratorgetw} \constfunc{wxCoord}{GetW}{\void} An alias for GetWidth. -\membersection{wxRegionIterator::GetWidth} -\constfunc{wxCoord}{GetWidth}{\void} +\membersection{wxRegionIterator::GetHeight}\label{wxregioniteratorgetheight} -Returns the width value for the current region. +\constfunc{wxCoord}{GetHeight}{\void} -\membersection{wxRegionIterator::GetH} +Returns the height value for the current region. -\constfunc{wxCoord}{GetH}{\void} -An alias for GetHeight. +\membersection{wxRegionIterator::GetH}\label{wxregioniteratorgeth} -\membersection{wxRegionIterator::GetHeight} +\constfunc{wxCoord}{GetH}{\void} -\constfunc{wxCoord}{GetWidth}{\void} +An alias for GetHeight. -Returns the width value for the current region. -\membersection{wxRegionIterator::GetRect} +\membersection{wxRegionIterator::GetRect}\label{wxregioniteratorgetrect} \constfunc{wxRect}{GetRect}{\void} Returns the current rectangle. -\membersection{wxRegionIterator::HaveRects} + +\membersection{wxRegionIterator::GetWidth}\label{wxregioniteratorgetwidth} + +\constfunc{wxCoord}{GetWidth}{\void} + +Returns the width value for the current region. + + +\membersection{wxRegionIterator::HaveRects}\label{wxregioniteratorhaverects} \constfunc{bool}{HaveRects}{\void} Returns {\tt true} if there are still some rectangles; otherwise returns {\tt false}. -\membersection{wxRegionIterator::Reset} + +\membersection{wxRegionIterator::Reset}\label{wxregioniteratorreset} \func{void}{Reset}{\void} @@ -322,7 +367,8 @@ Resets the iterator to the beginning of the rectangles. Resets the iterator to the given region. -\membersection{wxRegionIterator::operator $++$} + +\membersection{wxRegionIterator::operator $++$}\label{wxregioniteratorinc} \func{void}{operator $++$}{\void} @@ -330,7 +376,8 @@ Increment operator. Increments the iterator to the next region. \pythonnote{A wxPython alias for this operator is called {\tt Next}.} -\membersection{wxRegionIterator::operator bool} + +\membersection{wxRegionIterator::operator bool}\label{wxregioniteratorbool} \constfunc{}{operator bool}{\void}