X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a660d684eda27638bca0384b2058911a31c8e845..b41f29c357205531670a156b67247b9345688150:/docs/latex/wx/rect.tex diff --git a/docs/latex/wx/rect.tex b/docs/latex/wx/rect.tex index ca5c504568..3a55f65f9b 100644 --- a/docs/latex/wx/rect.tex +++ b/docs/latex/wx/rect.tex @@ -4,7 +4,11 @@ A class for manipulating rectangles. \wxheading{Derived from} -\helpref{wxObject}{wxobject} +None + +\wxheading{Include files} + + \wxheading{See also} @@ -12,13 +16,13 @@ A class for manipulating rectangles. \latexignore{\rtfignore{\wxheading{Members}}} -\membersection{wxRect::wxRect} +\membersection{wxRect::wxRect}\label{wxrectctor} \func{}{wxRect}{\void} Default constructor. -\func{}{wxRect}{\param{const int}{ x}, \param{const int}{ y}, \param{const int}{ width}, \param{const int}{ height}} +\func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}} Creates a wxRect object from x, y, width and height values. @@ -30,30 +34,51 @@ Creates a wxRect object from top-left and bottom-right points. Creates a wxRect object from position and size values. -\membersection{wxRect::x} +\membersection{wxRect::x}\label{wxrectx} \member{int}{x} -x member. +x coordinate of the top-level corner of the rectangle. -\membersection{wxRect::y} +\membersection{wxRect::y}\label{wxrecty} \member{int}{y} -y member. +y coordinate of the top-level corner of the rectangle. -\membersection{wxRect::width} +\membersection{wxRect::width}\label{wxrectwidth} \member{int}{width} Width member. -\membersection{wxRect::height} +\membersection{wxRect::height}\label{wxrectheight} \member{int}{height} Height member. +\membersection{wxRect::Deflate}\label{wxrectdeflate} + +\func{void}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} + +\func{void}{Deflate}{\param{wxCoord }{diff}} + +\constfunc{wxRect}{Deflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} + +Decrease the rectangle size by {\it dx} in x direction and {\it dy} in y +direction. Both (or one of) parameters may be negative to increase the +rectngle size. This method is the opposite of \helpref{Inflate}{wxrectinflate}. + +The second form uses the same {\it diff} for both {\it dx} and {\it dy}. + +The first two versions modify the rectangle in place, the last one returns a +new rectangle leaving this one unchanged. + +\wxheading{See also} + +\helpref{Inflate}{wxrectinflate} + \membersection{wxRect::GetBottom}\label{wxrectgetbottom} \constfunc{int}{GetBottom}{\void} @@ -78,6 +103,18 @@ Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectg Gets the position. +\membersection{wxRect::GetTopLeft}\label{wxrectgettopleft} + +\constfunc{wxPoint}{GetTopLeft}{\void} + +Gets the topleft position of the rectangle. (Same as GetPosition). + +\membersection{wxRect::GetBottomRight}\label{wxrectgetbottomright} + +\constfunc{wxPoint}{GetBottomRight}{\void} + +Gets the the bottom right position. Returns the bottom right point inside the rectangle. + \membersection{wxRect::GetRight}\label{wxrectgetright} \constfunc{int}{GetRight}{\void} @@ -114,46 +151,92 @@ Gets the x member. Gets the y member. +\membersection{wxRect::Inflate}\label{wxrectinflate} + +\func{void}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} + +\func{void}{Inflate}{\param{wxCoord }{diff}} + +\constfunc{wxRect}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} + +Increase the rectangle size by {\it dx} in x direction and {\it dy} in y +direction. Both (or one of) parameters may be negative to decrease the +rectangle size. + +The second form uses the same {\it diff} for both {\it dx} and {\it dy}. + +The first two versions modify the rectangle in place, the last one returns a +new rectangle leaving this one unchanged. + +\wxheading{See also} + +\helpref{Deflate}{wxrectdeflate} + +\membersection{wxRect:Inside}\label{wxrectinside} + +\constfunc{bool}{Inside}{\param{int }{x}, \param{int }{y}} + +\constfunc{bool}{Inside}{\param{const wxPoint\& }{pt}} + +Returns {\tt true} if the given point is inside the rectangle (or on its +boundary) and {\tt false} otherwise. + +\membersection{wxRect:Intersects}\label{wxrectintersects} + +\constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}} + +Returns {\tt true} if this rectangle has a non empty intersection with the +rectangle {\it rect} and {\tt false} otherwise. + +\membersection{wxRect::Offset}\label{wxrectoffset} + +\func{void}{Offset}{\param{wxCoord }{dx}, \param{wxCoord }{dy}} + +\func{void}{Offset}{\param{const wxPoint\& }{pt}} + +Moves the rectangle by the specified offset. If {\it dx} is positive, the +rectangle is moved to the right, if {\it dy} is positive, it is moved to the +bottom, otherwise it is moved to the left or top respectively. + \membersection{wxRect::SetHeight}\label{wxrectsetheight} -\func{void}{SetHeight}{\param{const int}{ height}} +\func{void}{SetHeight}{\param{int}{ height}} Sets the height. \membersection{wxRect::SetWidth}\label{wxrectsetwidth} -\func{void}{SetWidth}{\param{const int}{ width}} +\func{void}{SetWidth}{\param{int}{ width}} Sets the width. \membersection{wxRect::SetX}\label{wxrectsetx} -\func{void}{SetX}{\param{const int}{ x}} +\func{void}{SetX}{\param{int}{ x}} Sets the x position. \membersection{wxRect::SetY}\label{wxrectsety} -\func{void}{SetY}{\param{const int}{ y}} +\func{void}{SetY}{\param{int}{ y}} Sets the y position. -\membersection{wxRect::operator $=$} +\membersection{wxRect::operator $=$}\label{wxrectassign} \func{void}{operator $=$}{\param{const wxRect\& }{rect}} Assignment operator. -\membersection{wxRect::operator $==$} +\membersection{wxRect::operator $==$}\label{wxrectequal} \func{bool}{operator $==$}{\param{const wxRect\& }{rect}} Equality operator. -\membersection{wxRect::operator $!=$} +\membersection{wxRect::operator $!=$}\label{wxrectnotequal} \func{bool}{operator $!=$}{\param{const wxRect\& }{rect}} Inequality operator. -