Skip to main content
Version: 1.0.0-preview.34

Velaptor.Content.Texture

Velaptor

Velaptor.Content

Texture Class

The texture to render to a screen.

public sealed class Texture :
Velaptor.Content.ITexture,
Velaptor.Content.IContent

Inheritance System.Object → Texture

Implements ITexture, IContent

Constructors

Texture(string, string) Constructor

Initializes a new instance of the Texture class.

public Texture(string name, string filePath);

Parameters

name System.String

The name of the texture.

filePath System.String

The file path to the image file.

Exceptions

System.IO.FileNotFoundException
Thrown if the filePath is not found.

Texture(string, ImageData) Constructor

Initializes a new instance of the Texture class.

public Texture(string name, Velaptor.Graphics.ImageData imageData);

Parameters

name System.String

The name of the texture.

imageData ImageData

The image data of the texture.

Exceptions

System.ArgumentException
Thrown if the imageData is empty.

Properties

FilePath

Gets the path to the content.

public string FilePath { get; }

Implements FilePath

Property Value

System.String

Height

Gets the height of the texture.

public uint Height { get; set; }

Implements Height

Property Value

System.UInt32

Id

Gets the ID of the texture.

public uint Id { get; set; }

Implements Id

Property Value

System.UInt32

Name

Gets the name of the content.

public string Name { get; set; }

Implements Name

Property Value

System.String

Width

Gets the width of the texture.

public uint Width { get; set; }

Implements Width

Property Value

System.UInt32