C# Class SwfDotNet.IO.Tags.DefineMorphShapeTag

DefineMorphShapeTag defines a shape that will morph from one form into another.

Only the start and end shapes are defined. The Flash Player will perform the interpolation that transforms the shape at each staging in the morphing process.

Morphing can be applied to any shape, however there are a few restrictions:

  • The start and end shapes must have the same number of edges (StraightEdgeRecord and CurvedEdgeRecord objects).
  • The fill style (Solid, Bitmap or Gradient) must be the same in the start and end shape.
  • If a bitmap fill style is used then the same image must be used in the start and end shapes.
  • If a gradient fill style is used then the gradient must contain the same number of points in the start and end shape.
  • The start and end shape must contain the same set of ShapeStyle objects.

To perform the morphing of a shape the shape is placed in the display list using a PlaceObject2Tag object. The ratio attribute in the PlaceObject2Tag object defines the progress of the morphing process. The ratio ranges between 0.0 and 1.0 where 0 represents the start of the morphing process and 1.0, the end.

The edges may change their type when a shape is morphed. Straight edges can become curves and vice versa.

This tag was introduced in Flash 3.

Inheritance: BaseTag, DefineTag
Afficher le fichier Open project: bladecoding/SwfExport Class Usage Examples

Méthodes publiques

Méthode Description
DefineMorphShapeTag ( ) : System

Creates a new DefineMorphShapeTag instance.

DefineMorphShapeTag ( ushort characterId, Rect startBounds, Rect endBounds, uint offset, MorphFillStyleCollection morphFillStyles, MorphLineStyleCollection morphLineStyles, ShapeRecordCollection startEdges, ShapeRecordCollection endEdges ) : System

Creates a new DefineMorphShapeTag instance.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

UpdateData ( byte version ) : void

see base class

Méthodes protégées

Méthode Description
GetSizeOf ( ) : int

Gets the size of.

Method Details

DefineMorphShapeTag() public méthode

Creates a new DefineMorphShapeTag instance.
public DefineMorphShapeTag ( ) : System
Résultat System

DefineMorphShapeTag() public méthode

Creates a new DefineMorphShapeTag instance.
public DefineMorphShapeTag ( ushort characterId, Rect startBounds, Rect endBounds, uint offset, MorphFillStyleCollection morphFillStyles, MorphLineStyleCollection morphLineStyles, ShapeRecordCollection startEdges, ShapeRecordCollection endEdges ) : System
characterId ushort Character id.
startBounds SwfDotNet.IO.Tags.Types.Rect Start bounds.
endBounds SwfDotNet.IO.Tags.Types.Rect End bounds.
offset uint Offset.
morphFillStyles SwfDotNet.IO.Tags.Types.MorphFillStyleCollection Morph fill styles.
morphLineStyles SwfDotNet.IO.Tags.Types.MorphLineStyleCollection Morph line styles.
startEdges SwfDotNet.IO.Tags.Types.ShapeRecordCollection Start edges.
endEdges SwfDotNet.IO.Tags.Types.ShapeRecordCollection End edges.
Résultat System

GetSizeOf() protected méthode

Gets the size of.
protected GetSizeOf ( ) : int
Résultat int

ReadData() public méthode

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Résultat void

Serialize() public méthode

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Résultat void

UpdateData() public méthode

see base class
public UpdateData ( byte version ) : void
version byte
Résultat void