60 OCPNRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
61 OCPNRegion(
const wxPoint& topLeft,
const wxPoint& bottomRight);
64 OCPNRegion(
size_t n,
const wxPoint* points,
int fillStyle = wxODDEVEN_RULE);
68 wxRegion* GetNew_wxRegion()
const;
73 void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
77 bool operator==(
const OCPNRegion& region)
const {
return ODoIsEqual(region); }
78 bool operator!=(
const OCPNRegion& region)
const {
return !(*
this == region); }
80 bool IsOk()
const {
return m_refData != NULL; }
81 bool Ok()
const {
return IsOk(); }
84 bool GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h)
const {
85 return ODoGetBox(x, y, w, h);
87 wxRect GetBox()
const {
89 return ODoGetBox(x, y, w, h) ? wxRect(x, y, w, h) : wxRect();
93 wxRegionContain Contains(wxCoord x, wxCoord y)
const {
94 return ODoContainsPoint(x, y);
96 wxRegionContain Contains(
const wxPoint& pt)
const {
97 return ODoContainsPoint(pt.x, pt.y);
99 wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
const {
100 return ODoContainsRect(wxRect(x, y, w, h));
102 wxRegionContain Contains(
const wxRect& rect)
const {
103 return ODoContainsRect(rect);
110 virtual void Clear();
111 virtual bool IsEmpty()
const;
112 bool Empty()
const {
return IsEmpty(); }
117 void* GetRegion()
const;
119 bool Offset(wxCoord x, wxCoord y) {
return ODoOffset(x, y); }
120 bool Offset(
const wxPoint& pt) {
return ODoOffset(pt.x, pt.y); }
121 bool Intersect(
const OCPNRegion& region) {
return ODoIntersect(region); }
122 bool Union(
const OCPNRegion& region) {
return ODoUnionWithRegion(region); }
123 bool Union(wxCoord x, wxCoord y, wxCoord w, wxCoord h) {
124 return ODoUnionWithRect(wxRect(x, y, w, h));
126 bool Union(
const wxRect& rect) {
return ODoUnionWithRect(rect); }
127 bool Subtract(
const OCPNRegion& region) {
return ODoSubtract(region); }
131 virtual wxObjectRefData* CreateRefData()
const;
132 virtual wxObjectRefData* CloneRefData(
const wxObjectRefData* data)
const;
135 virtual bool ODoIsEqual(
const OCPNRegion& region)
const;
136 virtual bool ODoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h)
const;
137 virtual wxRegionContain ODoContainsPoint(wxCoord x, wxCoord y)
const;
138 virtual wxRegionContain ODoContainsRect(
const wxRect& rect)
const;
140 virtual bool ODoOffset(wxCoord x, wxCoord y);
141 virtual bool ODoUnionWithRect(
const wxRect& rect);
142 virtual bool ODoUnionWithRegion(
const OCPNRegion& region);
143 virtual bool ODoIntersect(
const OCPNRegion& region);
144 virtual bool ODoSubtract(
const OCPNRegion& region);