Class AffineTransformBuilder | Apps Script | Google for Developers (original) (raw)
Class AffineTransformBuilder
Stay organized with collections Save and categorize content based on your preferences.
AffineTransformBuilder
A builder for [AffineTransform](/apps-script/reference/slides/affine-transform)
objects. Defaults to the identity transform.
Call AffineTransformBuilder#build()
to get the [AffineTransform](/apps-script/reference/slides/affine-transform)
object.
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 ] }
Detailed documentation
build()
setScaleX(scaleX)
Sets the X coordinate scaling element and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
scaleX | Number |
Return
[AffineTransformBuilder](#)
setScaleY(scaleY)
Sets the Y coordinate scaling element and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
scaleY | Number |
Return
[AffineTransformBuilder](#)
setShearX(shearX)
Sets the X coordinate shearing element and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
shearX | Number |
Return
[AffineTransformBuilder](#)
setShearY(shearY)
Sets the Y coordinate shearing element and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
shearY | Number |
Return
[AffineTransformBuilder](#)
Sets the X coordinate translation element in points, and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
translateX | Number |
Return
[AffineTransformBuilder](#)
setTranslateY(translateY)
Sets the Y coordinate translation element in points, and returns the builder.
Parameters
Name | Type | Description |
---|---|---|
translateY | Number |
Return
[AffineTransformBuilder](#)
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.