//////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 13JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * {@inheritDoc} */ public bool Intersects(int x, int y, int w, int h) { if (NumOfPoints <= 0 || !GetBoundingBox().Intersects(x, y, w, h)) { return(false); } Crossings cross = GetCrossings(x, y, x + w, y + h); return(cross == null || !cross.IsEmpty()); }
//////////////////////////////////////////////////////////////////////////// //--------------------------------- REVISIONS ------------------------------ // Date Name Tracking # Description // --------- ------------------- ------------- ---------------------- // 13JUN2009 James Shen Initial Creation //////////////////////////////////////////////////////////////////////////// /** * {@inheritDoc} */ public bool Intersects(int x, int y, int w, int h) { if (w < 0 || h < 0) { return(false); } if (!GetCachedBounds().Intersects(x, y, w, h)) { return(false); } Crossings c = Crossings.FindCrossings(_curves, x, y, x + w, y + h); return(c == null || !c.IsEmpty()); }