예제 #1
0
 /// <summary>
 /// Gets the smallest rectangle that completely contains all segments of the figure.
 /// </summary>
 public XRect GetBoundingBox()
 {
   XRect rect = new XRect(StartPoint.X, StartPoint.Y, 0, 0);
   foreach (PathSegment segment in Segments)
     rect.Union(segment.GetBoundingBox());
   return rect;
 }
예제 #2
0
파일: XRect.cs 프로젝트: mapilab/PDFsharp
 /// <summary>
 /// Returns the intersection of a rectangle and a point.
 /// </summary>
 public static XRect Union(XRect rect, XPoint point)
 {
     rect.Union(new XRect(point, point));
     return(rect);
 }
예제 #3
0
파일: XRect.cs 프로젝트: mapilab/PDFsharp
 /// <summary>
 /// Returns the union of two rectangles.
 /// </summary>
 public static XRect Union(XRect rect1, XRect rect2)
 {
     rect1.Union(rect2);
     return(rect1);
 }
예제 #4
0
 /// <summary>
 /// Returns the intersection of a rectangle and a point.
 /// </summary>
 public static XRect Union(XRect rect, XPoint point)
 {
   rect.Union(new XRect(point, point));
   return rect;
 }
예제 #5
0
 /// <summary>
 /// Returns the union of two rectangles.
 /// </summary>
 public static XRect Union(XRect rect1, XRect rect2)
 {
   rect1.Union(rect2);
   return rect1;
 }