/// <summary> /// 点是否包含在GraphicsPath内 /// </summary> /// <param name="point"></param> /// <param name="rect"></param> /// <returns></returns> public static bool isInRectagle(this Point point, Rectangle rect) { return(GraphicsUtil.pointInRectagle(point, rect)); }
/// <summary> /// GraphicsPath内是否包含点 /// </summary> /// <param name="path"></param> /// <param name="point"></param> /// <returns></returns> public static bool containsPoint(this GraphicsPath path, Point point) { return(GraphicsUtil.pointInPath(point, path)); }
/// <summary> /// 点是否包含在GraphicsPath内 /// </summary> /// <param name="point"></param> /// <param name="path"></param> /// <returns></returns> public static bool isInPath(this Point point, GraphicsPath path) { return(GraphicsUtil.pointInPath(point, path)); }
/// <summary> /// 利用九宫图绘制图像 /// </summary> /// <param name="g">绘图对象</param> /// <param name="image">所需绘制的图片</param> /// <param name="target_rect">目标矩形</param> /// <param name="src_rect">来源矩形</param> public static void drawImageWithNineRect(this Graphics g, Image image, Rectangle target_rect, Rectangle src_rect) { GraphicsUtil.drawImageWithNineRect(g, image, target_rect, src_rect); }
/// <summary> /// 矩形区域是否与另一个矩形区域重叠 /// </summary> /// <param name="self"></param> /// <param name="rect"></param> /// <returns></returns> public static bool overlays(this RectangleF self, RectangleF rect) { return(GraphicsUtil.rectangleOverlayed(self, rect)); }
/// <summary> /// 获取胶囊形状路径 /// </summary> /// <param name="g"></param> /// <param name="rectangle">原矩形坐标</param> /// <returns></returns> public static GraphicsPath generateCapsule( this Graphics g, RectangleF rectangle) { return(GraphicsUtil.generateCapsule(g, rectangle)); }
/// <summary> /// Rectagle内是否包含点 /// </summary> /// <param name="rect"></param> /// <param name="point"></param> /// <returns></returns> public static bool containsPoint(this Rectangle rect, Point point) { return(GraphicsUtil.pointInRectagle(point, rect)); }