Ejemplo n.º 1
0
        /// <summary>
        /// Checks whether the bounding rectangle of this annotation is intersected by a rectangle.
        /// If OnIntersect is false the markedRect has to completly contain the bounding rectangle.
        /// </summary>
        /// <param name="markedRect"></param>
        /// <param name="onIntersect"></param>
        /// <returns></returns>
        public bool ContainsOrIntersectsWithRect(PdfSourceRect markedRect, bool onIntersect)
        {
            PdfSourceRect annotRect = new PdfSourceRect(Rect[0], Rect[1], Rect[2] - Rect[0], Rect[3] - Rect[1]);

            if (onIntersect)
            {
                return(markedRect.intersectsDouble(annotRect));
            }
            return(markedRect.contains(annotRect));
        }