예제 #1
0
        /// <summary>
        /// Determines whether the specified point is hit.
        /// </summary>
        /// <param name="view">The view.</param>
        /// <param name="point">The point.</param>
        /// <returns><c>true</c> if the specified point is hit; otherwise, <c>false</c>.</returns>
        public static bool IsHit(this Android.Views.View view, PointF point)
        {
            var r = new Rect();

            view.GetHitRect(r);

            var touch = new Rect((int)point.X, (int)point.Y, (int)point.X, (int)point.Y);

            return(r.Intersect(touch));
        }