Exemplo n.º 1
0
 /// <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));
 }
Exemplo n.º 2
0
 /// <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));
 }
Exemplo n.º 3
0
 /// <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));
 }
Exemplo n.º 4
0
 /// <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);
 }
Exemplo n.º 5
0
 /// <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));
 }
Exemplo n.º 6
0
 /// <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));
 }
Exemplo n.º 7
0
 /// <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));
 }