Google Apps Chat V1 Client - Class ImageCropStyle (0.1.3)

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 \ V1

Methods

__construct

Constructor.

Parameters
Name Description
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.

Returns
Type Description
int

setType

The crop type.

Parameter
Name Description
var int
Returns
Type Description
$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
}
Returns
Type Description
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
}
Parameter
Name Description
var float
Returns
Type Description
$this