C# Class OpenBveApi.Textures.Texture

Represents a RGBA texture with 32 bits per pixel.
Afficher le fichier Open project: leezer3/OpenBVE Class Usage Examples

Méthodes publiques

Méthode 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 méthode

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.
Résultat Texture

Equals() public méthode

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

GetTransparencyType() public méthode

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

Texture() public méthode

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.
Résultat System

operator() public static méthode

Checks whether two textures are equal.
public static operator ( ) : bool
Résultat bool