Exemplo n.º 1
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 13JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * {@inheritDoc}
         */
        public bool Contains(int x, int y, int w, int h)
        {
            if (NumOfNpoints <= 0 || !GetBoundingBox().Intersects(x, y, w, h))
            {
                return(false);
            }

            Crossings cross = GetCrossings(x, y, x + w, y + h);

            return(cross != null && cross.Covers(y, y + h));
        }
Exemplo n.º 2
0
        ////////////////////////////////////////////////////////////////////////////
        //--------------------------------- REVISIONS ------------------------------
        // Date       Name                 Tracking #         Description
        // ---------  -------------------  -------------      ----------------------
        // 13JUN2009  James Shen                              Initial Creation
        ////////////////////////////////////////////////////////////////////////////

        /**
         * {@inheritDoc}
         */
        public bool Contains(int x, int y, int w, int h)
        {
            if (w < 0 || h < 0)
            {
                return(false);
            }
            if (!GetCachedBounds().Contains(x, y, w, h))
            {
                return(false);
            }
            Crossings c = Crossings.FindCrossings(_curves, x, y, x + w, y + h);

            return(c.Covers(y, y + h));
        }