C#如何测试给定坐标点是否在GraphicsPath实例区域中?

解决方案 »

  1.   

        public static bool ScanGraphicsPath(Point p_Point, GraphicsPath p_GraphicsPath)
            {
                 Region _Region = new Region();
                 p_GraphicsPath.Reset();               
                _Region.MakeEmpty();
                _Region.Union(p_GraphicsPath);
                return _Region.IsVisible(p_Point);          
            }
      

  2.   

    使用GraphicsPath.IsVisible方法就可以了。