Namespace: DeltaEngine.Rendering2D
Assembly: DeltaEngine.Rendering2D (in DeltaEngine.Rendering2D.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Rendering2D.Tests.SpriteTests
4 unit tests call DeltaEngine.Rendering2D.Sprite.UV
Assembly: DeltaEngine.Rendering2D (in DeltaEngine.Rendering2D.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: RectangleRemarks
Examples
[Test, ApproveFirstFrameScreenshot] public void DrawModifiedUVSprite() { var sprite = new Sprite( new Material(ShaderFlags.Position2DColoredTextured, "DeltaEngineLogoAlpha"), Rectangle.FromCenter(new Vector2D(0.5f, 0.5f), new Size(0.2f))); sprite.LastUV = sprite.UV = new Rectangle(0, 0, 0.5f, 0.5f); }
[Test, CloseAfterFirstFrame] public void AddingUVCalculatorResultsThrowsException() { var sprite = new Sprite("DeltaEngineLogoAlpha", Rectangle.One); Assert.Throws<Sprite.RenderingDataComponentAddingIsNotSupported>( () => sprite.Add(new RenderingData())); }
[Test] public void SettingUVDoesNotSetLastUV() { var sprite = new Sprite("DeltaEngineLogoAlpha", Rectangle.Zero) { UV = Rectangle.HalfCentered }; Assert.AreEqual(Rectangle.One, sprite.LastUV); }
See Also