Class: Transform

Transform

Transform クラスは、表示オブジェクトに適用されるカラー調整プロパティと 2 次元の変換オブジェクトへのアクセスを提供します。
変換時に、表示オブジェクトのカラーまたは方向と位置が、現在の値または座標から新しい値または座標に調整(オフセット)されます。
Transform クラスは、表示オブジェクトおよびすべての親オブジェクトに適用されるカラー変換と 2 次元マトリックス変換に関するデータも収集します。
concatenatedColorTransform プロパティと concatenatedMatrix プロパティを使用して、これらの結合された変換にアクセスできます。
カラー変換を適用するには、ColorTransform オブジェクトを作成し、オブジェクトのメソッドとプロパティを使用してカラー調整を設定した後、
colorTransformation プロパティ(表示オブジェクトの transform プロパティの)を新しい ColorTransformation オブジェクトに割り当てます。
2 次元変換を適用するには、Matrix オブジェクトを作成し、マトリックスの 2 次元変換を設定した後、表示オブジェクトの transform.matrix プロパティを新しい Matrix オブジェクトに割り当てます。

The Transform class provides access to color adjustment properties and two--dimensional transformation objects that can be applied to a display object.
During the transformation, the color or the orientation and position of a display object is adjusted (offset) from the current values or coordinates to new values or coordinates.
The Transform class also collects data about color and two-dimensional matrix transformations that are applied to a display object and all of its parent objects.
You can access these combined transformations through the concatenatedColorTransform and concatenatedMatrix properties.
To apply color transformations: create a ColorTransform object,
set the color adjustments using the object's methods and properties,
and then assign the colorTransformation property of the transform property of the display object to the new ColorTransformation object.
To apply two-dimensional transformations: create a Matrix object,
set the matrix's two-dimensional transformation,
and then assign the transform.matrix property of the display object to the new Matrix object.

new next2d.geom.Transform (src)

NameTypeDescription
srcDisplayObject
Example

Example usage of Transform.

// new Transform
const {Transform} = next2d.geom;
const transform   = new Transform(displayObject);

Members

next2d.geom.Transform.namespace string staticconstant

指定されたクラスの空間名を返します。
Returns the space name of the specified class.

Default Value:
  • next2d.geom.Transform

colorTransform ColorTransform

表示オブジェクトのカラーを全体的に調整する値を格納している
ColorTransform オブジェクトです。
A ColorTransform object containing values that universally adjust
the colors in the display object.

concatenatedColorTransform ColorTransform readonly

この表示オブジェクトおよびルートレベルまでのすべての親オブジェクトに適用される、
結合されたカラー変換を表す ColorTransform オブジェクトです。
A ColorTransform object representing
the combined color transformations applied to the display object
and all of its parent objects, back to the root level.

matrix Matrix

表示オブジェクトの拡大 / 縮小、回転、および移動を変更する値を格納している
Matrix オブジェクトです。
A Matrix object containing values that alter the scaling,
rotation, and translation of the display object.

namespace string constant

指定されたオブジェクトの空間名を返します。
Returns the space name of the specified object.

Default Value:
  • next2d.geom.Transform

Methods

next2d.geom.Transform.toString ()string static

指定されたクラスのストリングを返します。
Returns the string representation of the specified class.

Default Value:
  • [class Transform]
Returns:
TypeDescription
string

concatenatedMatrix ()

この表示オブジェクトおよびルートレベルまでのそのすべての親オブジェクトの結合された
変換マトリックスを表す Matrix オブジェクトです。
A Matrix object representing the combined transformation matrixes
of the display object and all of its parent objects, back to the root level.

pixelBounds ()

ステージ上の表示オブジェクトの境界を示す矩形を定義する Transform オブジェクトです。
A Transform object that defines the bounding rectangle of
the display object on the stage.

toString ()string

指定されたオブジェクトのストリングを返します。
Returns the string representation of the specified object.

Returns:
TypeDescription
string