Interface ITextureLoader
Loads textures from files and streams.
public interface ITextureLoader
Methods
CreateFromColorArray(Color[], int, int, Color?)
Creates a texture from colors, width pixels wide and height pixels high, making every pixel equal to colorKey transparent when it is given.
ITexture CreateFromColorArray(Color[] colors, int width, int height, Color? colorKey = null)
Parameters
Returns
Load(Stream)
Loads a texture from stream, with no colour key.
ITexture Load(Stream stream)
Parameters
streamStream
Returns
Load(Stream, Color?)
Loads a texture from stream, making every pixel equal to colorKey transparent when it is given.
ITexture Load(Stream stream, Color? colorKey)
Parameters
Returns
Load(string)
Loads the texture in fileName, with no colour key.
ITexture Load(string fileName)
Parameters
fileNamestring
Returns
Load(string, Color?)
Loads a texture, making every pixel exactly equal to colorKey
fully transparent.
ITexture Load(string fileName, Color? colorKey)
Parameters
Returns
Remarks
Exact match, deliberately - no tolerance. This mirrors DirectDraw's SetColorKey with low == high, which is what these assets were authored against. Measured across the Odyssey sprite sheets, the art contains no near-black at all (nothing with every channel at or below 24 that isn't already pure black), so a tolerance would buy nothing and could only start eating real color.