C# Класс FSO.Files.Formats.IFF.Chunks.SPR2Frame

The frame (I.E sprite) of a SPR2 chunk.
Наследование: ITextureProvider, IWorldTextureProvider
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
PalData byte[]
PixelData Color[]
ZBufferData byte[]

Открытые методы

Метод Описание
DecodeIfRequired ( ) : void
GetPixel ( int x, int y ) : Color

Gets a pixel from this SPR2Frame.

GetTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D

Gets a texture representing this SPR2Frame.

GetWorldTexture ( GraphicsDevice device ) : WorldTexture
GetZTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D

Gets a z-texture representing this SPR2Frame.

Read ( uint version, IoBuffer io, uint guessedSize ) : void

Reads a SPR2 chunk from a stream.

ReadDeferred ( uint version, IoBuffer io ) : void
SPR2Frame ( SPR2 parent ) : System
SetData ( Color px, byte zpx, Rectangle rect ) : Color[]
SetPalt ( PALT p ) : void
SetPixel ( int x, int y, Color color ) : void

Gets a pixel from this SPR2Frame.

Write ( IoWriter io ) : void

Приватные методы

Метод Описание
Decode ( IoBuffer io ) : void

Decodes this SPR2Frame.

Описание методов

DecodeIfRequired() публичный метод

public DecodeIfRequired ( ) : void
Результат void

GetPixel() публичный метод

Gets a pixel from this SPR2Frame.
public GetPixel ( int x, int y ) : Color
x int X position of pixel.
y int Y position of pixel.
Результат Color

GetTexture() публичный метод

Gets a texture representing this SPR2Frame.
public GetTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D
device GraphicsDevice GraphicsDevice instance used for drawing.
Результат Microsoft.Xna.Framework.Graphics.Texture2D

GetWorldTexture() публичный метод

public GetWorldTexture ( GraphicsDevice device ) : WorldTexture
device GraphicsDevice
Результат FSO.Files.Utils.WorldTexture

GetZTexture() публичный метод

Gets a z-texture representing this SPR2Frame.
public GetZTexture ( GraphicsDevice device ) : Microsoft.Xna.Framework.Graphics.Texture2D
device GraphicsDevice GraphicsDevice instance used for drawing.
Результат Microsoft.Xna.Framework.Graphics.Texture2D

Read() публичный метод

Reads a SPR2 chunk from a stream.
public Read ( uint version, IoBuffer io, uint guessedSize ) : void
version uint Version of the SPR2 that this frame belongs to.
io FSO.Files.Utils.IoBuffer
guessedSize uint
Результат void

ReadDeferred() публичный метод

public ReadDeferred ( uint version, IoBuffer io ) : void
version uint
io FSO.Files.Utils.IoBuffer
Результат void

SPR2Frame() публичный метод

public SPR2Frame ( SPR2 parent ) : System
parent SPR2
Результат System

SetData() публичный метод

public SetData ( Color px, byte zpx, Rectangle rect ) : Color[]
px Color
zpx byte
rect Microsoft.Xna.Framework.Rectangle
Результат Color[]

SetPalt() публичный метод

public SetPalt ( PALT p ) : void
p PALT
Результат void

SetPixel() публичный метод

Gets a pixel from this SPR2Frame.
public SetPixel ( int x, int y, Color color ) : void
x int X position of pixel.
y int Y position of pixel.
color Color
Результат void

Write() публичный метод

public Write ( IoWriter io ) : void
io FSO.Files.Utils.IoWriter
Результат void

Описание свойств

PalData публичное свойство

public byte[] PalData
Результат byte[]

PixelData публичное свойство

public Color[] PixelData
Результат Color[]

ZBufferData публичное свойство

public byte[] ZBufferData
Результат byte[]