Example #1
0
        protected virtual RectangleF getBoundary(out Point2D leftbottom, out Point2D righttop)
        {
            double leftMost = double.PositiveInfinity;
            double rightMost = double.NegativeInfinity;
            double bottomMost = double.PositiveInfinity;
            double topMost = double.NegativeInfinity;

            RectangleF bounds = RectangleF.Empty;

            foreach (var kvp in targets.TargetRects)
            {
                bounds = RectangleF.Union(bounds, kvp.Value);
            }
            bounds.Inflate(border * 2, border * 2);
            leftMost = Math.Min(bounds.Left, bounds.Right);
            rightMost = Math.Max(bounds.Right, bounds.Left);
            bottomMost = Math.Min(bounds.Bottom, bounds.Top);
            topMost = Math.Max(bounds.Top, bounds.Bottom);
            leftbottom = new Utils.Point2D(leftMost, bottomMost);
            righttop = new Utils.Point2D(rightMost, topMost);
            m_bounds = bounds;
            return bounds;
        }
Example #2
0
 public Point2D(Point2D p)
 {
     this.x = p.X;
     this.y = p.Y;
 }
Example #3
0
 static Point2D()
 {
     Empty = new Point2D();
 }