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
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
Height
Gets the height of the texture.
public uint Height { get; set; }
Implements Height
Property Value
Id
Gets the ID of the texture.
public uint Id { get; set; }
Implements Id
Property Value
Name
Gets the name of the content.
public string Name { get; set; }
Implements Name
Property Value
Width
Gets the width of the texture.
public uint Width { get; set; }
Implements Width