Class AffineTransformBuilder
AffineTransformBuilder
AffineTransform
对象的构建器。默认为身份转换。
调用 AffineTransformBuilder#build()
以获取 AffineTransform
对象。
const transform =
SlidesApp.newAffineTransformBuilder().setScaleX(2.0).setShearY(1.1).build();
// The resulting transform matrix is
// [ 2.0 0.0 0.0 ]
// [ 1.1 1.0 0.0 ]
// [ 0 0 1 ]
}
详细文档
setTranslateY(translateY)
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-12-22。
[null,null,["最后更新时间 (UTC):2024-12-22。"],[[["`AffineTransformBuilder` helps create custom transformations for objects in Google Slides, like scaling or shearing."],["It provides methods to set scaling, shearing, and translation values for the X and Y coordinates."],["The `build()` method finalizes the transformation and returns an `AffineTransform` object, ready to be applied."],["This builder uses a fluent interface, allowing you to chain methods together for concise transformation definitions."]]],["`AffineTransformBuilder` constructs `AffineTransform` objects, defaulting to the identity transform. It uses methods like `setScaleX`, `setScaleY`, `setShearX`, `setShearY`, `setTranslateX`, and `setTranslateY` to modify the transformation elements. Each 'set' method takes a number parameter, and returns the builder. The `build()` method creates the `AffineTransform` object with the specified elements.\n"]]