1 \section{\class{wxRect
}}\label{wxrect
} 
   3 A class for manipulating rectangles.
 
   5 \wxheading{Derived from
} 
   9 \wxheading{Include files
} 
  15 \helpref{wxPoint
}{wxpoint
}, 
\helpref{wxSize
}{wxsize
} 
  17 \latexignore{\rtfignore{\wxheading{Members
}}} 
  19 \membersection{wxRect::wxRect
} 
  21 \func{}{wxRect
}{\void} 
  25 \func{}{wxRect
}{\param{int
}{ x
}, 
\param{int
}{ y
}, 
\param{int
}{ width
}, 
\param{int
}{ height
}} 
  27 Creates a wxRect object from x, y, width and height values.
 
  29 \func{}{wxRect
}{\param{const wxPoint\&
}{ topLeft
}, 
\param{const wxPoint\&
}{ bottomRight
}} 
  31 Creates a wxRect object from top-left and bottom-right points.
 
  33 \func{}{wxRect
}{\param{const wxPoint\&
}{ pos
}, 
\param{const wxSize\&
}{ size
}} 
  35 Creates a wxRect object from position and size values.
 
  37 \membersection{wxRect::x
} 
  41 x coordinate of the top-level corner of the rectangle.
 
  43 \membersection{wxRect::y
} 
  47 y coordinate of the top-level corner of the rectangle.
 
  49 \membersection{wxRect::width
} 
  55 \membersection{wxRect::height
} 
  61 \membersection{wxRect::Deflate
}\label{wxrectdeflate
} 
  63 \func{void
}{Deflate
}{\param{wxCoord 
}{dx
}, 
\param{wxCoord 
}{dy
}} 
  65 \func{void
}{Deflate
}{\param{wxCoord 
}{diff
}} 
  67 \constfunc{wxRect
}{Deflate
}{\param{wxCoord 
}{dx
}, 
\param{wxCoord 
}{dy
}} 
  69 Decrease the rectangle size by 
{\it dx
} in x direction and 
{\it dy
} in y
 
  70 direction. Both (or one of) parameters may be negative to increase the
 
  71 rectngle size. This method is the opposite of 
\helpref{Inflate
}{wxrectinflate
}.
 
  73 The second form uses the same 
{\it diff
} for both 
{\it dx
} and 
{\it dy
}.
 
  75 The first two versions modify the rectangle in place, the last one returns a
 
  76 new rectangle leaving this one unchanged.
 
  80 \helpref{Inflate
}{wxrectinflate
} 
  82 \membersection{wxRect::GetBottom
}\label{wxrectgetbottom
} 
  84 \constfunc{int
}{GetBottom
}{\void} 
  86 Gets the bottom point of the rectangle.
 
  88 \membersection{wxRect::GetHeight
}\label{wxrectgetheight
} 
  90 \constfunc{int
}{GetHeight
}{\void} 
  92 Gets the height member.
 
  94 \membersection{wxRect::GetLeft
}\label{wxrectgetleft
} 
  96 \constfunc{int
}{GetLeft
}{\void} 
  98 Gets the left point of the rectangle (the same as 
\helpref{wxRect::GetX
}{wxrectgetx
}).
 
 100 \membersection{wxRect::GetPosition
}\label{wxrectgetposition
} 
 102 \constfunc{wxPoint
}{GetPosition
}{\void} 
 106 \membersection{wxRect::GetRight
}\label{wxrectgetright
} 
 108 \constfunc{int
}{GetRight
}{\void} 
 110 Gets the right point of the rectangle.
 
 112 \membersection{wxRect::GetSize
}\label{wxrectgetsize
} 
 114 \constfunc{wxSize
}{GetSize
}{\void} 
 118 \membersection{wxRect::GetTop
}\label{wxrectgettop
} 
 120 \constfunc{int
}{GetTop
}{\void} 
 122 Gets the top point of the rectangle (the same as 
\helpref{wxRect::GetY
}{wxrectgety
}).
 
 124 \membersection{wxRect::GetWidth
}\label{wxrectgetwidth
} 
 126 \constfunc{int
}{GetWidth
}{\void} 
 128 Gets the width member.
 
 130 \membersection{wxRect::GetX
}\label{wxrectgetx
} 
 132 \constfunc{int
}{GetX
}{\void} 
 136 \membersection{wxRect::GetY
}\label{wxrectgety
} 
 138 \constfunc{int
}{GetY
}{\void} 
 142 \membersection{wxRect::Inflate
}\label{wxrectinflate
} 
 144 \func{void
}{Inflate
}{\param{wxCoord 
}{dx
}, 
\param{wxCoord 
}{dy
}} 
 146 \func{void
}{Inflate
}{\param{wxCoord 
}{diff
}} 
 148 \constfunc{wxRect
}{Inflate
}{\param{wxCoord 
}{dx
}, 
\param{wxCoord 
}{dy
}} 
 150 Increase the rectangle size by 
{\it dx
} in x direction and 
{\it dy
} in y
 
 151 direction. Both (or one of) parameters may be negative to decrease the
 
 154 The second form uses the same 
{\it diff
} for both 
{\it dx
} and 
{\it dy
}.
 
 156 The first two versions modify the rectangle in place, the last one returns a
 
 157 new rectangle leaving this one unchanged.
 
 161 \helpref{Deflate
}{wxrectdeflate
} 
 163 \membersection{wxRect:Inside
}\label{wxrectinside
} 
 165 \constfunc{bool
}{Inside
}{\param{int 
}{x
}, 
\param{int 
}{y
}} 
 167 \constfunc{bool
}{Inside
}{\param{const wxPoint\& 
}{pt
}} 
 169 Returns 
{\tt true
} if the given point is inside the rectangle (or on its
 
 170 boundary) and 
{\tt false
} otherwise.
 
 172 \membersection{wxRect:Intersects
}\label{wxrectintersects
} 
 174 \constfunc{bool
}{Intersects
}{\param{const wxRect\& 
}{rect
}} 
 176 Returns 
{\tt true
} if this rectangle has a non empty intersection with the
 
 177 rectangle 
{\it rect
} and 
{\tt false
} otherwise.
 
 179 \membersection{wxRect::Offset
}\label{wxrectoffset
} 
 181 \func{void
}{Offset
}{\param{wxCoord 
}{dx
}, 
\param{wxCoord 
}{dy
}} 
 183 \func{void
}{Offset
}{\param{const wxPoint\& 
}{pt
}} 
 185 Moves the rectangle by the specified offset. If 
{\it dx
} is positive, the
 
 186 rectangle is moved to the right, if 
{\it dy
} is positive, it is moved to the
 
 187 bottom, otherwise it is moved to the left or top respectively.
 
 189 \membersection{wxRect::SetHeight
}\label{wxrectsetheight
} 
 191 \func{void
}{SetHeight
}{\param{int
}{ height
}} 
 195 \membersection{wxRect::SetWidth
}\label{wxrectsetwidth
} 
 197 \func{void
}{SetWidth
}{\param{int
}{ width
}} 
 201 \membersection{wxRect::SetX
}\label{wxrectsetx
} 
 203 \func{void
}{SetX
}{\param{int
}{ x
}} 
 207 \membersection{wxRect::SetY
}\label{wxrectsety
} 
 209 \func{void
}{SetY
}{\param{int
}{ y
}} 
 213 \membersection{wxRect::operator $=$
} 
 215 \func{void
}{operator $=$
}{\param{const wxRect\& 
}{rect
}} 
 219 \membersection{wxRect::operator $==$
} 
 221 \func{bool
}{operator $==$
}{\param{const wxRect\& 
}{rect
}} 
 225 \membersection{wxRect::operator $!=$
} 
 227 \func{bool
}{operator $!=$
}{\param{const wxRect\& 
}{rect
}}