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 further configuration.
Usage
To use the WithHeight
method, you need to have an instance of TextureBuilder
. Call WithHeight
on this instance, passing the desired height as an integer parameter. This method is typically used in a chain of method calls to configure a texture before creating it.
Example
// Example of using WithHeight method
TextureBuilder builder = new TextureBuilder();
builder.WithHeight(256)
.WithWidth(512)
.WithFormat(ImageFormat.RGBA8);
Texture texture = builder.Create("MyTexture", false, data, data.Length);