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
Afficher le fichier Open project: rtezli/Blitzableiter

Protected Properties

Свойство Type Description
_fillStyles FillStyleArray
_lineStyles LineStyleArray
_numFillBits System.UInt16
_numLineBits System.UInt16
_shapeRecordBuffer byte[]
_shapeRecordStream System.IO.MemoryStream
_shapeRecords List

Méthodes publiques

Méthode 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 méthode

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
Résultat void

ShapeWithStyle() public méthode

public ShapeWithStyle ( byte InitialVersion ) : System
InitialVersion byte The initial version of the Swf file
Résultat System

ToString() public méthode

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

TryParseShapeRecords() public méthode

public TryParseShapeRecords ( MemoryStream input, TagTypes caller ) : void
input System.IO.MemoryStream
caller TagTypes
Résultat void

Verify() public méthode

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

Write() public méthode

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

Property Details

_fillStyles protected_oe property

protected FillStyleArray,Recurity.Swf _fillStyles
Résultat FillStyleArray

_lineStyles protected_oe property

protected LineStyleArray,Recurity.Swf _lineStyles
Résultat LineStyleArray

_numFillBits protected_oe property

protected UInt16,System _numFillBits
Résultat System.UInt16

_numLineBits protected_oe property

protected UInt16,System _numLineBits
Résultat System.UInt16

_shapeRecordBuffer protected_oe property

protected byte[] _shapeRecordBuffer
Résultat byte[]

_shapeRecordStream protected_oe property

protected MemoryStream,System.IO _shapeRecordStream
Résultat System.IO.MemoryStream

_shapeRecords protected_oe property

protected List _shapeRecords
Résultat List