C# Class OpenBveApi.Textures.Texture

Represents a RGBA texture with 32 bits per pixel.
Show file Open project: leezer3/OpenBVE Class Usage Examples

Public Methods

Method Description
ApplyParameters ( TextureParameters parameters ) : Texture

Applies the specified parameters onto this texture.

Equals ( object obj ) : bool

Checks whether this instance is equal to the specified object.

GetTransparencyType ( ) : TextureTransparencyType

Gets the type of transparency encountered in this texture.

Texture ( int width, int height, int bitsPerPixel, byte bytes ) : System

Creates a new instance of this class.

operator ( ) : bool

Checks whether two textures are equal.

Method Details

ApplyParameters() public method

Applies the specified parameters onto this texture.
Raised when the clip region is outside the texture bounds. Raised when the bits per pixel in the texture is not supported.
public ApplyParameters ( TextureParameters parameters ) : Texture
parameters TextureParameters The parameters, or a null reference.
return Texture

Equals() public method

Checks whether this instance is equal to the specified object.
public Equals ( object obj ) : bool
obj object The object.
return bool

GetTransparencyType() public method

Gets the type of transparency encountered in this texture.
Raised when the bits per pixel in the texture is not supported.
public GetTransparencyType ( ) : TextureTransparencyType
return TextureTransparencyType

Texture() public method

Creates a new instance of this class.
Raised when the number of bits per pixel is not 32. Raised when the byte array is a null reference. Raised when the byte array is of unexpected length.
public Texture ( int width, int height, int bitsPerPixel, byte bytes ) : System
width int The width of the texture in pixels.
height int The height of the texture in pixels.
bitsPerPixel int The number of bits per pixel. Must be 32.
bytes byte The texture data. Pixels are stored row-based from top to bottom, and within a row from left to right. For 32 bits per pixel, four bytes are used in the order red, green, blue and alpha.
return System

operator() public static method

Checks whether two textures are equal.
public static operator ( ) : bool
return bool