C# Class IrrlichtNETCP.Texture

Inheritance: NativeElement
Mostrar archivo Open project: Paulus/irrlichtnetcp Class Usage Examples

Public Methods

Method Description
GetPixel ( int x, int y ) : Color

Gets the current color of the pixel.

Lock ( ) : IntPtr

Call this before any modification/read of the texture via GetPixel/SetPixel If you try to modify/acces the texture without it, it will still work but really slower Because it will lock and unlock the texture each time you access a pixel.

MakeColorKey ( VideoDriver drv ) : void
MakeColorKey ( VideoDriver drv, Color color ) : void
MakeColorKey ( VideoDriver drv, IrrlichtNETCP.Position2D colorKeyPixelPos ) : void
Modify ( ModifyPixel callback ) : void

Modifies the texture using a simple callback called on each pixel's modification.

RegenerateMipMapLevels ( ) : void
Retrieve ( ) : ].Color[

Safe and fast way to retrieve all pixels of the texture.

SafeCopyInto ( Texture tex ) : void
Save ( string name ) : void

Saves the texture to a file

SetPixel ( int x, int y, Color color ) : void

Sets the current color of a pixel

Texture ( IntPtr raw ) : System
Unlock ( ) : void

You must always call this after each lock.

Protected Methods

Method Description
ModifyA1R5G5B5 ( ModifyPixel callback ) : void
ModifyA8R8G8B8 ( ModifyPixel callback ) : void
ModifyR5G6B5 ( ModifyPixel callback ) : void
RetrieveA1R5G5B5 ( ) : ].Color[
RetrieveA8R8G8B8 ( ) : ].Color[
RetrieveR5G6B5 ( ) : ].Color[

Private Methods

Method Description
LockResult_GetPixel ( IntPtr lockr, IntPtr texture, int x, int y, [ color ) : void
LockResult_SetPixel ( IntPtr lockr, IntPtr texture, int x, int y, int color ) : void
Texture_GetColorFormat ( IntPtr raw ) : ColorFormat
Texture_GetDriverType ( IntPtr raw ) : DriverType
Texture_GetName ( IntPtr raw ) : string
Texture_GetOriginalSize ( IntPtr raw, [ toR ) : void
Texture_GetPitch ( IntPtr raw ) : int
Texture_Lock ( IntPtr texture ) : IntPtr
Texture_RegenerateMipMapLevels ( IntPtr raw ) : void
Texture_UnLock ( IntPtr texture ) : void

Method Details

GetPixel() public method

Gets the current color of the pixel.
public GetPixel ( int x, int y ) : Color
x int Width of the pixel
y int Height of the pixel
return Color

Lock() public method

Call this before any modification/read of the texture via GetPixel/SetPixel If you try to modify/acces the texture without it, it will still work but really slower Because it will lock and unlock the texture each time you access a pixel.
public Lock ( ) : IntPtr
return System.IntPtr

MakeColorKey() public method

public MakeColorKey ( VideoDriver drv ) : void
drv VideoDriver
return void

MakeColorKey() public method

public MakeColorKey ( VideoDriver drv, Color color ) : void
drv VideoDriver
color Color
return void

MakeColorKey() public method

public MakeColorKey ( VideoDriver drv, IrrlichtNETCP.Position2D colorKeyPixelPos ) : void
drv VideoDriver
colorKeyPixelPos IrrlichtNETCP.Position2D
return void

Modify() public method

Modifies the texture using a simple callback called on each pixel's modification.
public Modify ( ModifyPixel callback ) : void
callback ModifyPixel Callback called for each pixel
return void

ModifyA1R5G5B5() protected method

protected ModifyA1R5G5B5 ( ModifyPixel callback ) : void
callback ModifyPixel
return void

ModifyA8R8G8B8() protected method

protected ModifyA8R8G8B8 ( ModifyPixel callback ) : void
callback ModifyPixel
return void

ModifyR5G6B5() protected method

protected ModifyR5G6B5 ( ModifyPixel callback ) : void
callback ModifyPixel
return void

RegenerateMipMapLevels() public method

public RegenerateMipMapLevels ( ) : void
return void

Retrieve() public method

Safe and fast way to retrieve all pixels of the texture.
public Retrieve ( ) : ].Color[
return ].Color[

RetrieveA1R5G5B5() protected method

protected RetrieveA1R5G5B5 ( ) : ].Color[
return ].Color[

RetrieveA8R8G8B8() protected method

protected RetrieveA8R8G8B8 ( ) : ].Color[
return ].Color[

RetrieveR5G6B5() protected method

protected RetrieveR5G6B5 ( ) : ].Color[
return ].Color[

SafeCopyInto() public method

public SafeCopyInto ( Texture tex ) : void
tex Texture
return void

Save() public method

Saves the texture to a file
public Save ( string name ) : void
name string Path to the file in Irrlicht's working directory
return void

SetPixel() public method

Sets the current color of a pixel
public SetPixel ( int x, int y, Color color ) : void
x int Width of the pixel
y int Height of the pixel
color Color Color of the pixel
return void

Texture() public method

public Texture ( IntPtr raw ) : System
raw System.IntPtr
return System

Unlock() public method

You must always call this after each lock.
public Unlock ( ) : void
return void