Reference documentation and code samples for the Google Apps Chat V1 Client class ImageCropStyle.
Represents the crop style applied to an image.
Google Workspace Add-ons and Chat apps : For example, here's how to apply a 16:9 aspect ratio:
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
Generated from protobuf message google.apps.card.v1.ImageCropStyle
Namespace
Google \ Apps \ Card \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ type
int
The crop type.
↳ aspect_ratio
float
The aspect ratio to use if the crop type is RECTANGLE_CUSTOM
. For example, here's how to apply a 16:9 aspect ratio: cropStyle { "type": "RECTANGLE_CUSTOM", "aspectRatio": 16/9 }
getType
The crop type.
int
setType
The crop type.
var
int
$this
getAspectRatio
The aspect ratio to use if the crop type is RECTANGLE_CUSTOM
.
For example, here's how to apply a 16:9 aspect ratio:
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
float
setAspectRatio
The aspect ratio to use if the crop type is RECTANGLE_CUSTOM
.
For example, here's how to apply a 16:9 aspect ratio:
cropStyle {
"type": "RECTANGLE_CUSTOM",
"aspectRatio": 16/9
}
var
float
$this