Rectangle GetInnerRectangle Method Delta Engine Documentation

Namespace: DeltaEngine.Datatypes
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public Rectangle GetInnerRectangle(
	Rectangle relativeRectangle
)

Return Value

Type: Rectangle
Remarks

Tests: DeltaEngine.Tests.Datatypes.RectangleTests
Examples

1 unit tests call DeltaEngine.Datatypes.Rectangle.GetInnerRectangle(DeltaEngine.Datatypes.Rectangle)
[Test]
public void GetInnerRectangle()
{
    var rect = new Rectangle(1, 1, 2, 2);
    Assert.AreEqual(rect, rect.GetInnerRectangle(Rectangle.One));
    Assert.AreEqual(new Rectangle(1.0f, 1.0f, 1.0f, 1.0f),
        rect.GetInnerRectangle(new Rectangle(0.0f, 0.0f, 0.5f, 0.5f)));
    Assert.AreEqual(new Rectangle(2.0f, 2.0f, 1.0f, 1.0f),
        rect.GetInnerRectangle(new Rectangle(0.5f, 0.5f, 0.5f, 0.5f)));
}
See Also