41 OCPNRegion(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
42 OCPNRegion(
const wxPoint& topLeft,
const wxPoint& bottomRight);
45 OCPNRegion(
size_t n,
const wxPoint* points,
int fillStyle = wxODDEVEN_RULE);
49 wxRegion* GetNew_wxRegion()
const;
54 void InitRect(wxCoord x, wxCoord y, wxCoord w, wxCoord h);
58 bool operator==(
const OCPNRegion& region)
const {
return ODoIsEqual(region); }
59 bool operator!=(
const OCPNRegion& region)
const {
return !(*
this == region); }
61 bool IsOk()
const {
return m_refData != NULL; }
62 bool Ok()
const {
return IsOk(); }
65 bool GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h)
const {
66 return ODoGetBox(x, y, w, h);
68 wxRect GetBox()
const {
70 return ODoGetBox(x, y, w, h) ? wxRect(x, y, w, h) : wxRect();
74 wxRegionContain Contains(wxCoord x, wxCoord y)
const {
75 return ODoContainsPoint(x, y);
77 wxRegionContain Contains(
const wxPoint& pt)
const {
78 return ODoContainsPoint(pt.x, pt.y);
80 wxRegionContain Contains(wxCoord x, wxCoord y, wxCoord w, wxCoord h)
const {
81 return ODoContainsRect(wxRect(x, y, w, h));
83 wxRegionContain Contains(
const wxRect& rect)
const {
84 return ODoContainsRect(rect);
92 virtual bool IsEmpty()
const;
93 bool Empty()
const {
return IsEmpty(); }
98 void* GetRegion()
const;
100 bool Offset(wxCoord x, wxCoord y) {
return ODoOffset(x, y); }
101 bool Offset(
const wxPoint& pt) {
return ODoOffset(pt.x, pt.y); }
102 bool Intersect(
const OCPNRegion& region) {
return ODoIntersect(region); }
103 bool Union(
const OCPNRegion& region) {
return ODoUnionWithRegion(region); }
104 bool Union(wxCoord x, wxCoord y, wxCoord w, wxCoord h) {
105 return ODoUnionWithRect(wxRect(x, y, w, h));
107 bool Union(
const wxRect& rect) {
return ODoUnionWithRect(rect); }
108 bool Subtract(
const OCPNRegion& region) {
return ODoSubtract(region); }
112 virtual wxObjectRefData* CreateRefData()
const;
113 virtual wxObjectRefData* CloneRefData(
const wxObjectRefData* data)
const;
116 virtual bool ODoIsEqual(
const OCPNRegion& region)
const;
117 virtual bool ODoGetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h)
const;
118 virtual wxRegionContain ODoContainsPoint(wxCoord x, wxCoord y)
const;
119 virtual wxRegionContain ODoContainsRect(
const wxRect& rect)
const;
121 virtual bool ODoOffset(wxCoord x, wxCoord y);
122 virtual bool ODoUnionWithRect(
const wxRect& rect);
123 virtual bool ODoUnionWithRegion(
const OCPNRegion& region);
124 virtual bool ODoIntersect(
const OCPNRegion& region);
125 virtual bool ODoSubtract(
const OCPNRegion& region);