/// <summary> /// Determines whether or not a point exists within the content /// </summary> /// <param name="point"> Point to hit-test for. </param> /// <returns> /// 'true' if the point exists within the content, 'false' otherwise /// </returns> public bool HitTestPoint(Point point) { HitTestDrawingContextWalker ctx = new HitTestWithPointDrawingContextWalker(point); DrawingContextWalk(ctx); return(ctx.IsHit); }
/// <summary> /// Determines whether or not a point exists in a Drawing /// </summary> /// <param name="drawing"> Drawing to hit-test</param> /// <param name="point"> Point to hit-test for </param> /// <returns> /// 'true' if the point exists within the drawing, 'false' otherwise /// </returns> internal static bool HitTestPoint(Drawing drawing, Point point) { if (drawing != null) { HitTestDrawingContextWalker ctx = new HitTestWithPointDrawingContextWalker(point); drawing.WalkCurrentValue(ctx); return ctx.IsHit; } else { return false; } }
/// <summary> /// Determines whether or not a point exists in a Drawing /// </summary> /// <param name="drawing"> Drawing to hit-test</param> /// <param name="point"> Point to hit-test for </param> /// <returns> /// 'true' if the point exists within the drawing, 'false' otherwise /// </returns> internal static bool HitTestPoint(Drawing drawing, Point point) { if (drawing != null) { HitTestDrawingContextWalker ctx = new HitTestWithPointDrawingContextWalker(point); drawing.WalkCurrentValue(ctx); return(ctx.IsHit); } else { return(false); } }
/// <summary> /// Determines whether or not a point exists within the content /// </summary> /// <param name="point"> Point to hit-test for. </param> /// <returns> /// 'true' if the point exists within the content, 'false' otherwise /// </returns> public bool HitTestPoint(Point point) { HitTestDrawingContextWalker ctx = new HitTestWithPointDrawingContextWalker(point); DrawingContextWalk(ctx); return ctx.IsHit; }