Description
The WithHeight
method is a member of the TextureBuilder
class in the Sandbox namespace. This method allows you to specify the height of a texture that you are building using the TextureBuilder
pattern. It returns the same TextureBuilder
instance, enabling method chaining for a fluent interface.
Usage
To use the WithHeight
method, you need to have an instance of TextureBuilder
. Call the method with an integer parameter representing the desired height of the texture. This method is typically used in a chain of method calls to configure various properties of a texture before creating it.
Example
// Example of using the WithHeight method
TextureBuilder builder = new TextureBuilder();
builder.WithHeight(256)
.WithWidth(512)
.WithFormat(ImageFormat.RGBA8)
.Create("MyTexture", false, data, data.Length);