1 \section{\class{wxRegion
}}\label{wxregion
}
3 A wxRegion represents a simple or complex region on a device context or window. It uses
4 reference counting, so copying and assignment operations are fast.
6 \wxheading{Derived from
}
8 \helpref{wxGDIObject
}{wxgdiobject
}\\
9 \helpref{wxObject
}{wxobject
}
11 \latexignore{\rtfignore{\wxheading{Members
}}}
13 \membersection{wxRegion::wxRegion
}\label{wxregionconstr
}
15 \func{}{wxRegion
}{\void}
19 \func{}{wxRegion
}{\param{long
}{ x
},
\param{long
}{ y
},
\param{long
}{ width
},
\param{long
}{ height
}}
21 Constructs a rectangular region with the given position and size.
23 \func{}{wxRegion
}{\param{const wxPoint\&
}{ topLeft
},
\param{const wxPoint\&
}{ bottomRight
}}
25 Constructs a rectangular region from the top left point and the bottom right point.
27 \func{}{wxRegion
}{\param{const wxRect\&
}{ rect
}}
29 Constructs a rectangular region a wxRect object.
31 \func{}{wxRegion
}{\param{const wxRegion\&
}{ region
}}
33 Constructs a region by copying another region.
35 \membersection{wxRegion::
\destruct{wxRegion
}}
37 \func{}{\destruct{wxRegion
}}{\void}
41 \membersection{wxRegion::Clear
}\label{wxregionclear
}
43 \func{void
}{Clear
}{\void}
45 Clears the current region.
47 \membersection{wxRegion::Contains
}\label{wxregioncontains
}
49 \constfunc{wxRegionContain
}{Contains
}{\param{long\&
}{x
},
\param{long\&
}{y
}}
51 Returns a value indicating whether the given point is contained within the region.
53 \constfunc{wxRegionContain
}{Contains
}{\param{const wxPoint\&
}{ pt
}}
55 Returns a value indicating whether the given point is contained within the region.
57 \constfunc{wxRegionContain
}{Contains
}{\param{long\&
}{x
},
\param{long\&
}{y
},
\param{long\&
}{width
},
\param{long\&
}{height
}}
59 Returns a value indicating whether the given rectangle is contained within the region.
61 \constfunc{wxRegionContain
}{Contains
}{\param{const wxRect\&
}{rect
}}
63 Returns a value indicating whether the given rectangle is contained within the region.
65 \wxheading{Return value
}
67 The return value is one of wxOutRegion, wxPartRegion and wxInRegion.
69 On Windows, only wxOutRegion and wxInRegion are returned; a value wxInRegion then indicates that
70 all or some part of the region is contained in this region.
72 \membersection{wxRegion::GetBox
}\label{wxregiongetbox
}
74 \constfunc{void
}{GetBox
}{\param{long\&
}{x
},
\param{long\&
}{y
},
\param{long\&
}{width
},
\param{long\&
}{height
}}
76 Returns the outer bounds of the region.
78 \constfunc{wxRect
}{GetBox
}{\void}
80 Returns the outer bounds of the region.
82 \membersection{wxRegion::Intersect
}\label{wxregionintersect
}
84 \func{bool
}{Intersect
}{\param{long
}{ x
},
\param{long
}{ y
},
\param{long
}{ width
},
\param{long
}{ height
}}
86 Finds the intersection of this region and another, rectangular region, specified using position and size.
88 \func{bool
}{Intersect
}{\param{const wxRect\&
}{ rect
}}
90 Finds the intersection of this region and another, rectangular region.
92 \func{bool
}{Intersect
}{\param{const wxRegion\&
}{ region
}}
94 Finds the intersection of this region and another region.
96 \wxheading{Return value
}
98 TRUE if successful, FALSE otherwise.
102 Creates the intersection of the two regions, that is, the parts which are in both regions. The result
103 is stored in this region.
105 \membersection{wxRegion::IsEmpty
}\label{wxregionisempty
}
107 \constfunc{bool
}{IsEmpty
}{\void}
109 \func{bool
}{IsEmpty
}{\void}
111 Returns TRUE if the region is empty, FALSE otherwise.
113 \func{bool
}{Subtract
}{\param{const wxRect\&
}{ rect
}}
115 Subtracts a rectangular region from this region.
117 \func{bool
}{Subtract
}{\param{const wxRegion\&
}{ region
}}
119 Subtracts a region from this region.
121 \wxheading{Return value
}
123 TRUE if successful, FALSE otherwise.
127 This operation combines the parts of 'this' region that are not part of the second region.
128 The result is stored in this region.
130 \membersection{wxRegion::Union
}\label{wxregionunion
}
132 \func{bool
}{Union
}{\param{long
}{ x
},
\param{long
}{ y
},
\param{long
}{ width
},
\param{long
}{ height
}}
134 Finds the union of this region and another, rectangular region, specified using position and size.
136 \func{bool
}{Union
}{\param{const wxRect\&
}{ rect
}}
138 Finds the union of this region and another, rectangular region.
140 \func{bool
}{Union
}{\param{const wxRegion\&
}{ region
}}
142 Finds the union of this region and another region.
144 \wxheading{Return value
}
146 TRUE if successful, FALSE otherwise.
150 This operation creates a region that combines all of this region and the second region.
151 The result is stored in this region.
153 \membersection{wxRegion::Xor
}\label{wxregionxor
}
155 \func{bool
}{Xor
}{\param{long
}{ x
},
\param{long
}{ y
},
\param{long
}{ width
},
\param{long
}{ height
}}
157 Finds the Xor of this region and another, rectangular region, specified using position and size.
159 \func{bool
}{Xor
}{\param{const wxRect\&
}{ rect
}}
161 Finds the Xor of this region and another, rectangular region.
163 \func{bool
}{Xor
}{\param{const wxRegion\&
}{ region
}}
165 Finds the Xor of this region and another region.
167 \wxheading{Return value
}
169 TRUE if successful, FALSE otherwise.
173 This operation creates a region that combines all of this region and the second region, except
174 for any overlapping areas. The result is stored in this region.
176 \membersection{wxRegion::operator $=$
}\label{wxregionassign
}
178 \func{void
}{operator $=$
}{\param{const wxRegion\&
}{ region
}}
180 Copies
{\it region
} by reference counting.