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:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[],[],null,["# Google Apps Chat V1 Client - Class ImageCropStyle (0.12.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.12.0 (latest)](/php/docs/reference/apps-chat/latest/Card.V1.ImageCropStyle)\n- [0.11.2](/php/docs/reference/apps-chat/0.11.2/Card.V1.ImageCropStyle)\n- [0.10.0](/php/docs/reference/apps-chat/0.10.0/Card.V1.ImageCropStyle)\n- [0.9.0](/php/docs/reference/apps-chat/0.9.0/Card.V1.ImageCropStyle)\n- [0.8.1](/php/docs/reference/apps-chat/0.8.1/Card.V1.ImageCropStyle)\n- [0.7.2](/php/docs/reference/apps-chat/0.7.2/Card.V1.ImageCropStyle)\n- [0.6.1](/php/docs/reference/apps-chat/0.6.1/Card.V1.ImageCropStyle)\n- [0.5.0](/php/docs/reference/apps-chat/0.5.0/Card.V1.ImageCropStyle)\n- [0.4.0](/php/docs/reference/apps-chat/0.4.0/Card.V1.ImageCropStyle)\n- [0.3.0](/php/docs/reference/apps-chat/0.3.0/Card.V1.ImageCropStyle)\n- [0.2.0](/php/docs/reference/apps-chat/0.2.0/Card.V1.ImageCropStyle)\n- [0.1.4](/php/docs/reference/apps-chat/0.1.4/Card.V1.ImageCropStyle) \nReference documentation and code samples for the Google Apps Chat V1 Client class ImageCropStyle.\n\nRepresents the crop style applied to an image.\n\n[Google Workspace Add-ons and\nChat apps](https://developers.google.com/workspace/extend):\nFor example, here's how to apply a 16:9 aspect ratio: \n\n cropStyle {\n \"type\": \"RECTANGLE_CUSTOM\",\n \"aspectRatio\": 16/9\n }\n\nGenerated from protobuf message `google.apps.card.v1.ImageCropStyle`\n\nNamespace\n---------\n\nGoogle \\\\ Apps \\\\ Card \\\\ V1\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getType\n\nThe crop type.\n\n### setType\n\nThe crop type.\n\n### getAspectRatio\n\nThe aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.\n\nFor example, here's how to apply a 16:9 aspect ratio: \n\n cropStyle {\n \"type\": \"RECTANGLE_CUSTOM\",\n \"aspectRatio\": 16/9\n }\n\n### setAspectRatio\n\nThe aspect ratio to use if the crop type is `RECTANGLE_CUSTOM`.\n\nFor example, here's how to apply a 16:9 aspect ratio: \n\n cropStyle {\n \"type\": \"RECTANGLE_CUSTOM\",\n \"aspectRatio\": 16/9\n }"]]