public virtual void TestEnvelope2D_corners() { com.epl.geometry.Envelope2D env = new com.epl.geometry.Envelope2D(0, 1, 2, 3); NUnit.Framework.Assert.IsFalse(env.Equals(null)); NUnit.Framework.Assert.IsTrue(env.Equals((object)new com.epl.geometry.Envelope2D(0, 1, 2, 3))); com.epl.geometry.Point2D pt2D = env.GetLowerLeft(); NUnit.Framework.Assert.IsTrue(pt2D.Equals(com.epl.geometry.Point2D.Construct(0, 1))); pt2D = env.GetUpperLeft(); NUnit.Framework.Assert.IsTrue(pt2D.Equals(com.epl.geometry.Point2D.Construct(0, 3))); pt2D = env.GetUpperRight(); NUnit.Framework.Assert.IsTrue(pt2D.Equals(com.epl.geometry.Point2D.Construct(2, 3))); pt2D = env.GetLowerRight(); NUnit.Framework.Assert.IsTrue(pt2D.Equals(com.epl.geometry.Point2D.Construct(2, 1))); { com.epl.geometry.Point2D[] corners = new com.epl.geometry.Point2D[4]; env.QueryCorners(corners); NUnit.Framework.Assert.IsTrue(corners[0].Equals(com.epl.geometry.Point2D.Construct(0, 1))); NUnit.Framework.Assert.IsTrue(corners[1].Equals(com.epl.geometry.Point2D.Construct(0, 3))); NUnit.Framework.Assert.IsTrue(corners[2].Equals(com.epl.geometry.Point2D.Construct(2, 3))); NUnit.Framework.Assert.IsTrue(corners[3].Equals(com.epl.geometry.Point2D.Construct(2, 1))); env.QueryCorners(corners); NUnit.Framework.Assert.IsTrue(corners[0].Equals(env.QueryCorner(0))); NUnit.Framework.Assert.IsTrue(corners[1].Equals(env.QueryCorner(1))); NUnit.Framework.Assert.IsTrue(corners[2].Equals(env.QueryCorner(2))); NUnit.Framework.Assert.IsTrue(corners[3].Equals(env.QueryCorner(3))); } { com.epl.geometry.Point2D[] corners = new com.epl.geometry.Point2D[4]; env.QueryCornersReversed(corners); NUnit.Framework.Assert.IsTrue(corners[0].Equals(com.epl.geometry.Point2D.Construct(0, 1))); NUnit.Framework.Assert.IsTrue(corners[1].Equals(com.epl.geometry.Point2D.Construct(2, 1))); NUnit.Framework.Assert.IsTrue(corners[2].Equals(com.epl.geometry.Point2D.Construct(2, 3))); NUnit.Framework.Assert.IsTrue(corners[3].Equals(com.epl.geometry.Point2D.Construct(0, 3))); env.QueryCornersReversed(corners); NUnit.Framework.Assert.IsTrue(corners[0].Equals(env.QueryCorner(0))); NUnit.Framework.Assert.IsTrue(corners[1].Equals(env.QueryCorner(3))); NUnit.Framework.Assert.IsTrue(corners[2].Equals(env.QueryCorner(2))); NUnit.Framework.Assert.IsTrue(corners[3].Equals(env.QueryCorner(1))); } NUnit.Framework.Assert.IsTrue(env.GetCenter().Equals(com.epl.geometry.Point2D.Construct(1, 2))); NUnit.Framework.Assert.IsFalse(env.ContainsExclusive(env.GetUpperLeft())); NUnit.Framework.Assert.IsTrue(env.Contains(env.GetUpperLeft())); NUnit.Framework.Assert.IsTrue(env.ContainsExclusive(env.GetCenter())); }
/// <summary>Returns the envelope's lower right corner point.</summary> /// <returns>Returns the lower right corner point.</returns> public virtual com.epl.geometry.Point GetLowerRight() { return(new com.epl.geometry.Point(m_envelope.GetLowerRight())); }