Béziers magically work with the QuadTree (sometimes)
[ipdf/code.git] / src / rect.h
index a79f6ac..7b7adc1 100644 (file)
@@ -18,6 +18,14 @@ namespace IPDF
                        s << "{" << Float(x) << ", " << Float(y) << ", " << Float(w) << ", " << Float(h) << "}";
                        return s.str();
                }
+               inline bool PointIn(Real pt_x, Real pt_y) const
+               {
+                       if (pt_x < x) return false;
+                       if (pt_y < y) return false;
+                       if (pt_x > x + w) return false;
+                       if (pt_y > y + h) return false;
+                       return true;
+               }
        };
 }
 

UCC git Repository :: git.ucc.asn.au