C# Class SWFProcessing.SWFModeller.SWFWriter

An object which can take a SWF model and produce binary SWF data.
Mostra file Open project: WeeWorld/Swiffotron Class Usage Examples

Public Methods

Method Description
SWFWriter ( SWF swf, SWFWriterOptions options, StringBuilder writeLog, StringBuilder abcWriteLog ) : System.Collections.Generic

Initializes a new instance of a SWF writer with the given options.

SWFWriter ( SWF swf, StringBuilder writeLog, StringBuilder abcWriteLog ) : System.Collections.Generic

Initializes a new instance of a SWF writer with the default options.

ToByteArray ( ) : byte[]

Takes a SWF object and turns it into a .swf binary file. It might seem nicer to write it to a stream, but the stream has a file length at the start which we only know once we've written it all out to a byte array anyway. Returning it as a chunk of data is simply more honest; an output stream would promise streaminess behind the scenes that we cannot deliver.

Private Methods

Method Description
BindClasses ( ListSet unboundClasses ) : void
CloseTag ( ) : WriteBuffer
LogMessage ( string s, bool boundary = false ) : void
LogTag ( Tag t, string logdata ) : void
OpenTag ( Tag tag, string log = null ) : WriteBuffer
TagForPlaceObject ( PlaceObject po ) : Tag
WriteBGColorTag ( ) : void
WriteBodylessTag ( Tag tag, string log = null ) : void

Note that if you're fixing this method, it shares functionality with CloseTag, which may also need the same fix. Whatever it is you're fixing.

WriteCharacter ( ICharacter ch, ListSet unboundClasses ) : void
WriteEditText ( EditText text, int fontID ) : void
WriteFileAttributesTag ( ) : void
WriteFont ( SWFFont font, int fid ) : void
WriteImage ( IImage image ) : void
WritePlaceObjectTag ( PlaceObject po ) : void
WriteRemoveObjectTag ( RemoveObject ro ) : void
WriteSprite ( Sprite s, ListSet unboundClasses ) : void
WriteStaticText ( StaticText text ) : void
WriteTags ( ) : void

Does the grunt-work of writing all the objects in the SWF file, tagging each of them with a record header.

Method Details

SWFWriter() public method

Initializes a new instance of a SWF writer with the given options.
public SWFWriter ( SWF swf, SWFWriterOptions options, StringBuilder writeLog, StringBuilder abcWriteLog ) : System.Collections.Generic
swf SWF The SWF to write.
options SWFWriterOptions The options that control the output, or /// null for the defaults.
writeLog System.Text.StringBuilder
abcWriteLog System.Text.StringBuilder
return System.Collections.Generic

SWFWriter() public method

Initializes a new instance of a SWF writer with the default options.
public SWFWriter ( SWF swf, StringBuilder writeLog, StringBuilder abcWriteLog ) : System.Collections.Generic
swf SWF The SWF to write.
writeLog System.Text.StringBuilder
abcWriteLog System.Text.StringBuilder
return System.Collections.Generic

ToByteArray() public method

Takes a SWF object and turns it into a .swf binary file. It might seem nicer to write it to a stream, but the stream has a file length at the start which we only know once we've written it all out to a byte array anyway. Returning it as a chunk of data is simply more honest; an output stream would promise streaminess behind the scenes that we cannot deliver.
public ToByteArray ( ) : byte[]
return byte[]