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

CurvedEdgeRecord is used to define a curve. Curved lines are constructed using a Quadratic Bezier curve.

The curve is specified using two points relative to the current drawing position, an off-curve control point and an on-curve anchor point which defines the end-point of the curve.

To define a curve the points are defined as pairs of relative coordinates. The control point is specified relative to the current drawing point and the anchor point is specified relative to the control point. Once the line is drawn, the anchor point becomes the current drawing point.

The relative coordinates are specified in twips (where 20 twips = 1 pixel) and must be in the range -65536..65535.

The CurvedEdge record was introduced in Flash 1.

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

Public Methods

Method Description
CurvedEdgeRecord ( ) : System

Creates a new CurvedEdgeRecord instance.

CurvedEdgeRecord ( int controlDeltaX, int controlDeltaY, int anchorDeltaX, int anchorDeltaY ) : System

Creates a new CurvedEdgeRecord instance.

GetBitSizeOf ( int currentLength ) : int

see ShapeRecord.GetBitSizeOf

ReadData ( BufferedBinaryReader binaryReader, byte flags ) : void

Reads the data.

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

WriteTo ( BufferedBinaryWriter writer ) : void

Writes to a binary writer.

Private Methods

Method Description
GetNumBits ( ) : uint

Gets the num bits.

Method Details

CurvedEdgeRecord() public method

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

CurvedEdgeRecord() public method

Creates a new CurvedEdgeRecord instance.
public CurvedEdgeRecord ( int controlDeltaX, int controlDeltaY, int anchorDeltaX, int anchorDeltaY ) : System
controlDeltaX int The x-coordinate of the control point relative to the current drawing point.
controlDeltaY int The y-coordinate of the control point relative to the current drawing point.
anchorDeltaX int The x-coordinate of the anchor point relative to the control point.
anchorDeltaY int The y-coordinate of the anchor point relative to the control point.
return System

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 ) : void
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader Binary reader.
flags byte Flags.
return void

Serialize() public method

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

WriteTo() public method

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