C# Class Recurity.Swf.ShapeWithStyle

The SHAPEWITHSTYLE structure extends the SHAPE structure by including fill style and

line style information. SHAPEWITHSTYLE is used by the DefineShape tag.

The story of byte aligness is the following. Structures are byte aligned if they only read byte aligned

structures or if the last read opreration has been an integer type or an other byte aligned structure. Sounds

complicated but it isn't.

 

Lets assume Stream.Postion is 0 and BitStream.Position is 0.

 

we read 3 bits: bits.GetBits( 3 ); Stream.Postion is 1 and BitStream.Position is 3

we read a byte: br.ReadByte(); Stream.Postion is 2 and BitStream.Position is 3

we read 3 bits: bits.GetBits( 3 ); Stream.Postion is 3 and BitStream.Position is 6

 

but after reading a byte aligned structure the first 3 bits should be {0,1,2}.

That is the reason why we have to reset the BitStream.Position before or after we red a byte aligned

structure.

Inheritance: AbstractSwfElement
Exibir arquivo Open project: rtezli/Blitzableiter

Protected Properties

Property Type Description
_fillStyles FillStyleArray
_lineStyles LineStyleArray
_numFillBits System.UInt16
_numLineBits System.UInt16
_shapeRecordBuffer byte[]
_shapeRecordStream System.IO.MemoryStream
_shapeRecords List

Public Methods

Method Description
Parse ( Stream input, long length, TagTypes caller ) : void

Parses this object out of a stream.

ShapeWithStyle ( byte InitialVersion ) : System

ToString ( ) : string

Converts the value of this instance to a System.String.

TryParseShapeRecords ( MemoryStream input, TagTypes caller ) : void

Verify ( ) : bool

Verifies this object and its components for documentation compliance.

Write ( Stream output ) : void

Writes this object back to a stream.

Method Details

Parse() public method

Parses this object out of a stream.
public Parse ( Stream input, long length, TagTypes caller ) : void
input Stream The input Stream
length long The length of the ShapeRecords
caller TagTypes The tag that calls this method
return void

ShapeWithStyle() public method

public ShapeWithStyle ( byte InitialVersion ) : System
InitialVersion byte The initial version of the Swf file
return System

ToString() public method

Converts the value of this instance to a System.String.
public ToString ( ) : string
return string

TryParseShapeRecords() public method

public TryParseShapeRecords ( MemoryStream input, TagTypes caller ) : void
input System.IO.MemoryStream
caller TagTypes
return void

Verify() public method

Verifies this object and its components for documentation compliance.
public Verify ( ) : bool
return bool

Write() public method

Writes this object back to a stream.
public Write ( Stream output ) : void
output Stream The stream to write to.
return void

Property Details

_fillStyles protected_oe property

protected FillStyleArray,Recurity.Swf _fillStyles
return FillStyleArray

_lineStyles protected_oe property

protected LineStyleArray,Recurity.Swf _lineStyles
return LineStyleArray

_numFillBits protected_oe property

protected UInt16,System _numFillBits
return System.UInt16

_numLineBits protected_oe property

protected UInt16,System _numLineBits
return System.UInt16

_shapeRecordBuffer protected_oe property

protected byte[] _shapeRecordBuffer
return byte[]

_shapeRecordStream protected_oe property

protected MemoryStream,System.IO _shapeRecordStream
return System.IO.MemoryStream

_shapeRecords protected_oe property

protected List _shapeRecords
return List