Entity2D LastDrawArea Property Delta Engine Documentation

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

public Rectangle LastDrawArea { get; set; }

Property Value

Type: Rectangle
Remarks

Tests: DeltaEngine.Rendering2D.Tests.Entity2DTests
Remarks

Tests: DeltaEngine.Rendering2D.Tests.SpriteTests
Examples

1 unit tests call DeltaEngine.Rendering2D.Entity2D.LastDrawArea
[Test]
public void SettingDrawAreaWithoutInterpolationSetsLastDrawAreaAlso()
{
    var entity = new Entity2D(Rectangle.One);
    Assert.AreEqual(Rectangle.One, entity.LastDrawArea);
    entity.SetWithoutInterpolation(Rectangle.HalfCentered);
    Assert.AreEqual(Rectangle.HalfCentered, entity.DrawArea);
    Assert.AreEqual(Rectangle.HalfCentered, entity.LastDrawArea);
}
Examples

1 unit tests call DeltaEngine.Rendering2D.Entity2D.LastDrawArea
[Test, CloseAfterFirstFrame]
public void SetDrawAreaWithoutInterpolation()
{
    var sprite = new Sprite("DeltaEngineLogoAlpha", Rectangle.Zero);
    sprite.SetWithoutInterpolation(Rectangle.One);
    sprite.SetWithoutInterpolation(sprite.renderingData);
    Assert.AreEqual(Rectangle.One, sprite.DrawArea);
    Assert.AreEqual(Rectangle.One, sprite.LastDrawArea);
    Assert.AreEqual(sprite.renderingData, sprite.Get<RenderingData>());
}
See Also