主题
Matrix4
一种被记录、可重放的 Matrix4 变换意图。
该类记录构造函数和会改变状态的方法调用,随后 Flet 会在 Flutter 中重放这些调用,为 matrix 构建出一个真实的 Matrix4。
属性
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
ctor | _Matrix4Call | _Matrix4Call(name='identity'() | Recorded constructor call. |
ops | list[_Matrix4Call] | [] | Ordered list of recorded mutating operations. |
方法
| 名称 | 类型 | 默认值 | 说明 |
|---|---|---|---|
identity | 'Matrix4' | — | Creates a matrix initialized with identity transform. |
translation_values | 'Matrix4' | — | Creates a matrix initialized with translation components. |
diagonal3_values | 'Matrix4' | — | Creates a matrix initialized with diagonal scale values. |
rotation_z | 'Matrix4' | — | Creates a matrix initialized with a z-axis rotation in radians. |
skew_x | 'Matrix4' | — | Creates a matrix initialized with x-axis skew in radians. |
skew_y | 'Matrix4' | — | Creates a matrix initialized with y-axis skew in radians. |
translate | 'Matrix4' | — | Appends translation operation. |
scale | 'Matrix4' | — | Appends scale operation. If only x is provided then uniform scale is used. If x and y are provided then 2D scale is used. If all three are provided then 3D scale is used. |
rotate_z | 'Matrix4' | — | Appends z-axis rotation operation in radians. |
rotate_x | 'Matrix4' | — | Appends x-axis rotation operation in radians. |
rotate_y | 'Matrix4' | — | Appends y-axis rotation operation in radians. |
set_entry | 'Matrix4' | — | Appends raw matrix entry mutation. |
multiply | 'Matrix4' | — | Appends multiplication by another recorded matrix. |