Beispiel #1
0
        /// <summary>
        /// {@inheritDoc}
        /// @since 1.2
        /// </summary>
        public virtual bool Intersects(double x, double y, double w, double h)
        {
            if (w < 0 || h < 0)
            {
                return(false);
            }
            if (!CachedBounds.Intersects(x, y, w, h))
            {
                return(false);
            }
            Crossings c = Crossings.findCrossings(Curves, x, y, x + w, y + h);

            return(c == null || !c.Empty);
        }
Beispiel #2
0
        /// <summary>
        /// {@inheritDoc}
        /// @since 1.2
        /// </summary>
        public virtual bool Contains(double x, double y, double w, double h)
        {
            if (w < 0 || h < 0)
            {
                return(false);
            }
            if (!CachedBounds.Contains(x, y, w, h))
            {
                return(false);
            }
            Crossings c = Crossings.findCrossings(Curves, x, y, x + w, y + h);

            return(c != null && c.covers(y, y + h));
        }