Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Datatypes.RectangleTests
1 unit tests call DeltaEngine.Datatypes.Rectangle.Merge(DeltaEngine.Datatypes.Rectangle)
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Parameters
- other
- Type: DeltaEngine.Datatypes Rectangle
Return Value
Type: RectangleRemarks
Examples
[Test] public void MergeRectangles() { var leftUpperRect = new Rectangle(-3.0f, -4.5f, 0.6f, 1.0f); var rightUpperRect = new Rectangle(5.0f, -3.0f, 1.0f, 1.0f); var leftLowerRect = new Rectangle(-4.0f, 6.2f, 1.0f, 0.8f); var rightLowerRect = new Rectangle(2.0f, 1.0f, 0.5f, 0.5f); Assert.AreEqual(new Rectangle(-3.0f, -4.5f, 9.0f, 2.5f), leftUpperRect.Merge(rightUpperRect)); Assert.AreEqual(new Rectangle(2.0f, -3.0f, 4.0f, 4.5f), rightLowerRect.Merge(rightUpperRect)); Assert.AreEqual(new Rectangle(-4.0f, -3.0f, 10.0f, 10.0f), leftLowerRect.Merge(rightUpperRect)); }
See Also