/// <summary> /// /// </summary> /// <param name="text"></param> /// <param name="rect"></param> /// <param name="selected"></param> /// <param name="dx"></param> /// <param name="dy"></param> /// <returns></returns> public static bool HitTestText(XText text, Rect2 rect, ISet <BaseShape> selected, double dx, double dy) { if (ShapeBounds.GetTextBounds(text, dx, dy).IntersectsWith(rect)) { if (selected != null) { selected.Add(text); return(false); } else { return(true); } } return(false); }