C# Class SWFProcessing.SWFModeller.SWFDataTypeWriter

A writer that can write an assortment of atomic SWF types to a stream.
Inheritance: IDisposable
ファイルを表示 Open project: WeeWorld/Swiffotron Class Usage Examples

Public Methods

Method Description
Align8 ( ) : void
Align8Unchecked ( ) : void

Call this only if you know bitCount to be >0

Close ( ) : void
Dispose ( ) : void
SWFDataTypeWriter ( Stream outputStream ) : System

Initializes a new instance of a SWF data writer

Write ( byte b ) : void
Write ( byte b, int off, int len ) : void
WriteBit ( bool bit ) : void
WriteBytes ( byte bytes ) : void
WriteColorTransform ( ColorTransform cxform, bool withAlpha ) : void
WriteFB ( float value, int nbits ) : void
WriteFIXED8 ( float v ) : void
WriteMatrix ( Matrix m ) : void
WriteRGB ( int v ) : void
WriteRGBA ( int v ) : void
WriteRect ( Rect r ) : void

Writes a rectangle to the stream

WARNING: Bear in mind that the writer will probably not be byte-aligned after calling this.

WriteSBits ( int value, int numBits ) : void
WriteSI16 ( int v ) : void
WriteSI32 ( int v ) : void
WriteString ( string s, bool write8BitLen = false ) : void

Strings in SWF are zero-terminated.

WriteUBits ( uint value, int numBits ) : void
WriteUI16 ( uint v ) : void
WriteUI24 ( uint v ) : void
WriteUI32 ( uint v ) : void
WriteUI8 ( uint v ) : void

Private Methods

Method Description
RequiredBits ( int v ) : int
WriteColorComponent ( int value, int numBits ) : void
WriteVarlenFBPair ( float a, float b ) : void

Method Details

Align8() public method

public Align8 ( ) : void
return void

Align8Unchecked() public method

Call this only if you know bitCount to be >0
public Align8Unchecked ( ) : void
return void

Close() public method

public Close ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

SWFDataTypeWriter() public method

Initializes a new instance of a SWF data writer
public SWFDataTypeWriter ( Stream outputStream ) : System
outputStream Stream The stream to write SWF data to.
return System

Write() public method

public Write ( byte b ) : void
b byte
return void

Write() public method

public Write ( byte b, int off, int len ) : void
b byte
off int
len int
return void

WriteBit() public method

public WriteBit ( bool bit ) : void
bit bool
return void

WriteBytes() public method

public WriteBytes ( byte bytes ) : void
bytes byte
return void

WriteColorTransform() public method

public WriteColorTransform ( ColorTransform cxform, bool withAlpha ) : void
cxform SWFProcessing.SWFModeller.Characters.ColorTransform
withAlpha bool
return void

WriteFB() public method

public WriteFB ( float value, int nbits ) : void
value float
nbits int
return void

WriteFIXED8() public method

public WriteFIXED8 ( float v ) : void
v float
return void

WriteMatrix() public method

public WriteMatrix ( Matrix m ) : void
m Matrix
return void

WriteRGB() public method

public WriteRGB ( int v ) : void
v int
return void

WriteRGBA() public method

public WriteRGBA ( int v ) : void
v int
return void

WriteRect() public method

Writes a rectangle to the stream
WARNING: Bear in mind that the writer will probably not be byte-aligned after calling this.
public WriteRect ( Rect r ) : void
r SWFProcessing.ModellingUtils.Geom.Rect The rectangle to write.
return void

WriteSBits() public method

public WriteSBits ( int value, int numBits ) : void
value int
numBits int
return void

WriteSI16() public method

public WriteSI16 ( int v ) : void
v int
return void

WriteSI32() public method

public WriteSI32 ( int v ) : void
v int
return void

WriteString() public method

Strings in SWF are zero-terminated.
public WriteString ( string s, bool write8BitLen = false ) : void
s string The string to write
write8BitLen bool Some weird parts of SWF have a zero-terminated /// string prefixed by a length. Yeah, I know.
return void

WriteUBits() public method

public WriteUBits ( uint value, int numBits ) : void
value uint
numBits int
return void

WriteUI16() public method

public WriteUI16 ( uint v ) : void
v uint
return void

WriteUI24() public method

public WriteUI24 ( uint v ) : void
v uint
return void

WriteUI32() public method

public WriteUI32 ( uint v ) : void
v uint
return void

WriteUI8() public method

public WriteUI8 ( uint v ) : void
v uint
return void