1998-05-20 10:25:30 -04:00
|
|
|
\section{\class{wxRect}}\label{wxrect}
|
|
|
|
|
|
|
|
A class for manipulating rectangles.
|
|
|
|
|
|
|
|
\wxheading{Derived from}
|
|
|
|
|
1999-01-24 09:57:09 -05:00
|
|
|
None
|
1998-05-20 10:25:30 -04:00
|
|
|
|
1999-02-15 15:41:29 -05:00
|
|
|
\wxheading{Include files}
|
|
|
|
|
|
|
|
<wx/gdicmn.h>
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\wxheading{See also}
|
|
|
|
|
|
|
|
\helpref{wxPoint}{wxpoint}, \helpref{wxSize}{wxsize}
|
|
|
|
|
|
|
|
\latexignore{\rtfignore{\wxheading{Members}}}
|
|
|
|
|
|
|
|
\membersection{wxRect::wxRect}
|
|
|
|
|
|
|
|
\func{}{wxRect}{\void}
|
|
|
|
|
|
|
|
Default constructor.
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{}{wxRect}{\param{int}{ x}, \param{int}{ y}, \param{int}{ width}, \param{int}{ height}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Creates a wxRect object from x, y, width and height values.
|
|
|
|
|
|
|
|
\func{}{wxRect}{\param{const wxPoint\&}{ topLeft}, \param{const wxPoint\&}{ bottomRight}}
|
|
|
|
|
|
|
|
Creates a wxRect object from top-left and bottom-right points.
|
|
|
|
|
|
|
|
\func{}{wxRect}{\param{const wxPoint\&}{ pos}, \param{const wxSize\&}{ size}}
|
|
|
|
|
|
|
|
Creates a wxRect object from position and size values.
|
|
|
|
|
|
|
|
\membersection{wxRect::x}
|
|
|
|
|
|
|
|
\member{int}{x}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
x coordinate of the top-level corner of the rectangle.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxRect::y}
|
|
|
|
|
|
|
|
\member{int}{y}
|
|
|
|
|
2000-07-15 15:51:35 -04:00
|
|
|
y coordinate of the top-level corner of the rectangle.
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
\membersection{wxRect::width}
|
|
|
|
|
|
|
|
\member{int}{width}
|
|
|
|
|
|
|
|
Width member.
|
|
|
|
|
|
|
|
\membersection{wxRect::height}
|
|
|
|
|
|
|
|
\member{int}{height}
|
|
|
|
|
|
|
|
Height member.
|
|
|
|
|
2002-05-20 11:28:12 -04:00
|
|
|
\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}
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxRect::GetBottom}\label{wxrectgetbottom}
|
|
|
|
|
|
|
|
\constfunc{int}{GetBottom}{\void}
|
|
|
|
|
|
|
|
Gets the bottom point of the rectangle.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetHeight}\label{wxrectgetheight}
|
|
|
|
|
|
|
|
\constfunc{int}{GetHeight}{\void}
|
|
|
|
|
|
|
|
Gets the height member.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetLeft}\label{wxrectgetleft}
|
|
|
|
|
|
|
|
\constfunc{int}{GetLeft}{\void}
|
|
|
|
|
|
|
|
Gets the left point of the rectangle (the same as \helpref{wxRect::GetX}{wxrectgetx}).
|
|
|
|
|
|
|
|
\membersection{wxRect::GetPosition}\label{wxrectgetposition}
|
|
|
|
|
|
|
|
\constfunc{wxPoint}{GetPosition}{\void}
|
|
|
|
|
|
|
|
Gets the position.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetRight}\label{wxrectgetright}
|
|
|
|
|
|
|
|
\constfunc{int}{GetRight}{\void}
|
|
|
|
|
|
|
|
Gets the right point of the rectangle.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetSize}\label{wxrectgetsize}
|
|
|
|
|
|
|
|
\constfunc{wxSize}{GetSize}{\void}
|
|
|
|
|
|
|
|
Gets the size.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetTop}\label{wxrectgettop}
|
|
|
|
|
|
|
|
\constfunc{int}{GetTop}{\void}
|
|
|
|
|
|
|
|
Gets the top point of the rectangle (the same as \helpref{wxRect::GetY}{wxrectgety}).
|
|
|
|
|
|
|
|
\membersection{wxRect::GetWidth}\label{wxrectgetwidth}
|
|
|
|
|
|
|
|
\constfunc{int}{GetWidth}{\void}
|
|
|
|
|
|
|
|
Gets the width member.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetX}\label{wxrectgetx}
|
|
|
|
|
|
|
|
\constfunc{int}{GetX}{\void}
|
|
|
|
|
|
|
|
Gets the x member.
|
|
|
|
|
|
|
|
\membersection{wxRect::GetY}\label{wxrectgety}
|
|
|
|
|
|
|
|
\constfunc{int}{GetY}{\void}
|
|
|
|
|
|
|
|
Gets the y member.
|
|
|
|
|
2000-02-17 09:06:00 -05:00
|
|
|
\membersection{wxRect::Inflate}\label{wxrectinflate}
|
|
|
|
|
|
|
|
\func{void}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
|
|
|
|
|
|
|
|
\func{void}{Inflate}{\param{wxCoord }{diff}}
|
|
|
|
|
2002-05-20 11:28:12 -04:00
|
|
|
\constfunc{wxRect}{Inflate}{\param{wxCoord }{dx}, \param{wxCoord }{dy}}
|
|
|
|
|
2000-02-17 09:06:00 -05:00
|
|
|
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
|
2002-06-07 16:15:28 -04:00
|
|
|
rectangle size.
|
2000-02-17 09:06:00 -05:00
|
|
|
|
|
|
|
The second form uses the same {\it diff} for both {\it dx} and {\it dy}.
|
|
|
|
|
2002-05-20 11:28:12 -04:00
|
|
|
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}}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns {\tt true} if the given point is inside the rectangle (or on its
|
|
|
|
boundary) and {\tt false} otherwise.
|
2002-05-20 11:28:12 -04:00
|
|
|
|
|
|
|
\membersection{wxRect:Intersects}\label{wxrectintersects}
|
|
|
|
|
|
|
|
\constfunc{bool}{Intersects}{\param{const wxRect\& }{rect}}
|
|
|
|
|
2003-01-17 19:16:34 -05:00
|
|
|
Returns {\tt true} if this rectangle has a non empty intersection with the
|
|
|
|
rectangle {\it rect} and {\tt false} otherwise.
|
2002-05-20 11:28:12 -04:00
|
|
|
|
|
|
|
\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.
|
|
|
|
|
1998-05-20 10:25:30 -04:00
|
|
|
\membersection{wxRect::SetHeight}\label{wxrectsetheight}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetHeight}{\param{int}{ height}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the height.
|
|
|
|
|
|
|
|
\membersection{wxRect::SetWidth}\label{wxrectsetwidth}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetWidth}{\param{int}{ width}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the width.
|
|
|
|
|
|
|
|
\membersection{wxRect::SetX}\label{wxrectsetx}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetX}{\param{int}{ x}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the x position.
|
|
|
|
|
|
|
|
\membersection{wxRect::SetY}\label{wxrectsety}
|
|
|
|
|
1998-06-14 08:11:50 -04:00
|
|
|
\func{void}{SetY}{\param{int}{ y}}
|
1998-05-20 10:25:30 -04:00
|
|
|
|
|
|
|
Sets the y position.
|
|
|
|
|
|
|
|
\membersection{wxRect::operator $=$}
|
|
|
|
|
|
|
|
\func{void}{operator $=$}{\param{const wxRect\& }{rect}}
|
|
|
|
|
|
|
|
Assignment operator.
|
|
|
|
|
|
|
|
\membersection{wxRect::operator $==$}
|
|
|
|
|
|
|
|
\func{bool}{operator $==$}{\param{const wxRect\& }{rect}}
|
|
|
|
|
|
|
|
Equality operator.
|
|
|
|
|
|
|
|
\membersection{wxRect::operator $!=$}
|
|
|
|
|
|
|
|
\func{bool}{operator $!=$}{\param{const wxRect\& }{rect}}
|
|
|
|
|
|
|
|
Inequality operator.
|
|
|
|
|