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
}
Implements
Namespace: Google.Apps.Card.V1
Assembly: Google.Apps.Card.V1.dll
Syntax
public sealed class ImageCropStyle : IMessage<ImageCropStyle>, IEquatable<ImageCropStyle>, IDeepCloneable<ImageCropStyle>, IBufferMessage, IMessage
Constructors
ImageCropStyle()
Declaration
public ImageCropStyle()
ImageCropStyle(ImageCropStyle)
Declaration
public ImageCropStyle(ImageCropStyle other)
Parameters
Type | Name | Description |
---|---|---|
ImageCropStyle | other |
Properties
AspectRatio
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
}
Declaration
public double AspectRatio { get; set; }
Property Value
Type | Description |
---|---|
double |
Type
The crop type.
Declaration
public ImageCropStyle.Types.ImageCropType Type { get; set; }
Property Value
Type | Description |
---|---|
ImageCropStyle.Types.ImageCropType |