/// <summary> /// Returns the bounding box of the window. /// </summary> /// <returns>The bounding box of the window.</returns> public BoundingBox GetWindowBox() { var box = new BoundingBox(); box.Adjust(ClientToWorld(new Point(0, 0)).ToPoint2D()); box.Adjust(ClientToWorld(new Point(0, Height)).ToPoint2D()); box.Adjust(ClientToWorld(new Point(Width, 0)).ToPoint2D()); box.Adjust(ClientToWorld(new Point(Width, Height)).ToPoint2D()); return box; }
/// <summary>Get the box that is the union with another bounding box,</summary> /// <param name="box">The bounding box.</param> public BoundingBox Union(BoundingBox box) { BoundingBox unionBox = new BoundingBox(this); unionBox.Adjust(box); return unionBox; }