C# Класс SwfDotNet.IO.Tags.Types.Matrix

Matrix is used to specify two-dimensional coordinate transforms, allowing an object to be scaled, rotated or moved without changing the original definition of how the object is drawn.

A two-dimensional transform is defined using a 3x3 matrix and the new values for a pair of coordinates (x, y) are calculated using a matrix multiplication (see Macromedia specifications).

Different transformations such as scaling, rotation, shearing and translation can be performed using the above matrix multiplication. More complex transformations can be defined by performing successive matrix multiplications in a process known as compositing. This allows a complex transformations to performed on an object.

This tag was introduced in Flash 1.

Наследование: SizeStruct, ISwfSerializer
Показать файл Открыть проект

Открытые методы

Метод Описание
GetSizeOf ( ) : int

Gets the size of.

IsUnityTransform ( ) : bool

Get if the matrix transformation will not change the physical appearance or location of a shape.

Matrix ( ) : System

Creates a new Matrix instance.

Matrix ( float matrix ) : System

Creates a new Matrix instance.

Matrix ( int x, int y ) : System

Creates a new Matrix instance.

Matrix ( int x, int y, double scaleX, double scaleY ) : System

Creates a new Matrix instance.

ReadData ( BufferedBinaryReader binaryReader ) : void

Reads the data.

Rotate ( double angle ) : void

Sets the angle which the transform will rotate an object.

Scale ( double x, double y ) : void

Sets the scaling factor for the transform.

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

Shear ( double x, double y ) : void

Sets the shearing factor for the transform.

TransformPoint ( int x, int y ) : int[]

Applies the transformation to the coordinates of a point.

Translate ( int x, int y ) : void

Sets the translation points of the transform.

WriteTo ( BufferedBinaryWriter binaryWriter ) : void

Writes to.

Приватные методы

Метод Описание
Composite ( float m ) : void

Composites the specified m.

ConvertToRadians ( double angle ) : double

Converts to radians.

GetRotateBitsNum ( ) : uint

Gets the rotate bits num.

GetScaleBitsNum ( ) : uint

Gets the scale bits num.

GetTranslateBitsNum ( ) : uint

Gets the translate bits num.

HasRotate ( ) : bool

Determines whether this instance has rotate.

HasScale ( ) : bool

Determines whether this instance has scale.

HasTranslate ( ) : bool

Determines whether this instance has translate.

Описание методов

GetSizeOf() публичный Метод

Gets the size of.
public GetSizeOf ( ) : int
Результат int

IsUnityTransform() публичный Метод

Get if the matrix transformation will not change the physical appearance or location of a shape.
public IsUnityTransform ( ) : bool
Результат bool

Matrix() публичный Метод

Creates a new Matrix instance.
public Matrix ( ) : System
Результат System

Matrix() публичный Метод

Creates a new Matrix instance.
public Matrix ( float matrix ) : System
matrix float Matrix.
Результат System

Matrix() публичный Метод

Creates a new Matrix instance.
public Matrix ( int x, int y ) : System
x int X.
y int Y.
Результат System

Matrix() публичный Метод

Creates a new Matrix instance.
public Matrix ( int x, int y, double scaleX, double scaleY ) : System
x int X.
y int Y.
scaleX double Scale X.
scaleY double Scale Y.
Результат System

ReadData() публичный Метод

Reads the data.
public ReadData ( BufferedBinaryReader binaryReader ) : void
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader Binary reader.
Результат void

Rotate() публичный Метод

Sets the angle which the transform will rotate an object.
public Rotate ( double angle ) : void
angle double Angle value, in degrees, to rotate the object clockwise.
Результат void

Scale() публичный Метод

Sets the scaling factor for the transform.
public Scale ( double x, double y ) : void
x double Value to scale the object in the x direction.
y double Value to scale the object in the y direction.
Результат void

Serialize() публичный Метод

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Результат void

Shear() публичный Метод

Sets the shearing factor for the transform.
public Shear ( double x, double y ) : void
x double Value to shear the object in the x direction.
y double Value to shear the object in the y direction.
Результат void

TransformPoint() публичный Метод

Applies the transformation to the coordinates of a point.
public TransformPoint ( int x, int y ) : int[]
x int X-coordinate of a point.
y int Y-coordinate of a point.
Результат int[]

Translate() публичный Метод

Sets the translation points of the transform.
public Translate ( int x, int y ) : void
x int The x-coordinate where the object will be displayed.
y int The y-coordinate where the object will be displayed.
Результат void

WriteTo() публичный Метод

Writes to.
public WriteTo ( BufferedBinaryWriter binaryWriter ) : void
binaryWriter SwfDotNet.IO.Utils.BufferedBinaryWriter Binary writer.
Результат void