C# Class SwfDotNet.IO.Tags.Types.StyleChangeRecord

StyleChangeRecord is used to change the drawing environment when a shape is drawn.

Three operations can be performed:

  • Select a line style or fill style.
  • Move the current drawing point.
  • Define a new set of line and fill styles.

An StyleChangeRecord object can specify one or more of the operations rather than specifying them in separate StyleChangeRecord objects - compacting the size of the binary data when the object is encoded. Conversely if an operation is not defined then the values may be omitted.

A new drawing point is specified using the absolute x and y coordinates. If an StyleChangeRecord object is the first in a shape then the current drawing point is the origin of the shape (0,0).

New fill and line styles can be added to the StyleChangeRecord object to change the way shapes are drawn.

This was introduced in Flash 1.

Inheritance: NonEdgeRecord
Show file Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method Description
GetBitSizeOf ( int currentLength ) : int

see ShapeRecord.GetBitSizeOf

ReadData ( BufferedBinaryReader binaryReader, byte flags, byte &numFillBits, byte &numLineBits, ShapeType shapeType ) : void

Reads the data.

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

StyleChangeRecord ( ) : System

Creates a new StyleChangeRecord instance.

StyleChangeRecord ( FillStyleCollection fillStyles, LineStyleCollection lineStyles ) : System

Creates a new StyleChangeRecord instance.

StyleChangeRecord ( int moveX, int moveY ) : System

Creates a new StyleChangeRecord instance.

StyleChangeRecord ( int moveX, int moveY, ushort fillStyle1 ) : System

Creates a new StyleChangeRecord instance.

StyleChangeRecord ( ushort lineStyle, ushort fillStyle0, ushort fillStyle1 ) : System

Creates a new StyleChangeRecord instance.

StyleChangeRecord ( ushort lineStyle, ushort fillStyle0, ushort fillStyle1, int moveX, int moveY ) : System

Creates a new StyleChangeRecord instance.

WriteTo ( BufferedBinaryWriter writer ) : void

Writes to.

Private Methods

Method Description
GetMoveNumBits ( ) : uint

Gets the move num bits.

HasFillStyle0 ( ) : bool

Determines whether [has fill style0].

HasFillStyle1 ( ) : bool

Determines whether [has fill style1].

HasLineStyle ( ) : bool

Determines whether [has line style].

HasMoveTo ( ) : bool

Determines whether [has move to].

HasNewStyle ( ) : bool

Determines whether [has new style].

Method Details

GetBitSizeOf() public method

see ShapeRecord.GetBitSizeOf
public GetBitSizeOf ( int currentLength ) : int
currentLength int
return int

ReadData() public method

Reads the data.
public ReadData ( BufferedBinaryReader binaryReader, byte flags, byte &numFillBits, byte &numLineBits, ShapeType shapeType ) : void
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader Binary reader.
flags byte Flags.
numFillBits byte Num fill bits.
numLineBits byte Num line bits.
shapeType ShapeType Shape type.
return void

Serialize() public method

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
return void

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( ) : System
return System

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( FillStyleCollection fillStyles, LineStyleCollection lineStyles ) : System
fillStyles FillStyleCollection Fill styles.
lineStyles LineStyleCollection Line styles.
return System

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( int moveX, int moveY ) : System
moveX int Move X.
moveY int Move Y.
return System

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( int moveX, int moveY, ushort fillStyle1 ) : System
moveX int Move X.
moveY int Move Y.
fillStyle1 ushort Fill style1.
return System

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( ushort lineStyle, ushort fillStyle0, ushort fillStyle1 ) : System
lineStyle ushort Line style.
fillStyle0 ushort Fill style0.
fillStyle1 ushort Fill style1.
return System

StyleChangeRecord() public method

Creates a new StyleChangeRecord instance.
public StyleChangeRecord ( ushort lineStyle, ushort fillStyle0, ushort fillStyle1, int moveX, int moveY ) : System
lineStyle ushort Line style.
fillStyle0 ushort Fill style0.
fillStyle1 ushort Fill style1.
moveX int Move X.
moveY int Move Y.
return System

WriteTo() public method

Writes to.
public WriteTo ( BufferedBinaryWriter writer ) : void
writer SwfDotNet.IO.Utils.BufferedBinaryWriter Writer.
return void